package com.sf.day11;

public class MyExpTest {
    public static void regist(int num) throws MyException{
        if(num < 0){
            throw  new MyException("人数为负");
        }else {
            throw new MyException("登记人数"+num);
        }
    }

    public static void main(String[] args) throws MyException {
        regist(12);
    }
}
