This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package com.studentmanagement.exception;
/**
* 重复学生异常,当尝试添加ID已存在的学生时抛出
*/
public class DuplicateStudentException extends Exception {
* 构造函数
* @param message 异常信息
public DuplicateStudentException(String message) {
super(message);
}
* 构造函数,带学生ID
* @param id 学生ID
public DuplicateStudentException(int id) {
super("学生ID " + id + " 已存在");