You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5MI/NetworkFailureException.java

76 lines
3.0 KiB

/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
* 2010-2011MiCode
*/
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* Apache License, Version 2.0
*/
/*
* you may not use this file except in compliance with the License.
* 使
*/
/*
* You may obtain a copy of the License at
*
*/
* http://www.apache.org/licenses/LICENSE-2.0
* Apache License, Version 2.0
*/
/*
* Unless required by applicable law or agreed to in writing, software
*
*/
/*
* distributed under the License is distributed on an "AS IS" BASIS,
*
*/
/*
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
/*
* See the License for the specific language governing permissions and
*
*/
/*
* limitations under the License.
*
*/
package net.micode.notes.gtask.exception;
// 这行代码声明了当前类所在的包名即net.micode.notes.gtask.exception。
public class NetworkFailureException extends Exception {
// 这行代码声明了一个名为NetworkFailureException的类它继承自Java标准库中的Exception类。
// 这意味着NetworkFailureException是一个检查型异常checked exception需要在方法签名中声明或在代码中捕获。
private static final long serialVersionUID = 2107610287180234136L;
// 这行代码声明了一个名为serialVersionUID的静态常量用于序列化版本控制。
// 当对象被序列化时serialVersionUID用于确保发送方和接收方对序列化的对象版本保持一致。
public NetworkFailureException() {
// 这是NetworkFailureException的无参构造函数它调用了父类Exception的无参构造函数。
super();
}
public NetworkFailureException(String paramString) {
// 这是NetworkFailureException的一个带有一个String类型参数的构造函数用于传递异常信息。
// 它调用了父类Exception的带有String类型参数的构造函数。
super(paramString);
}
public NetworkFailureException(String paramString, Throwable paramThrowable) {
// 这是NetworkFailureException的一个带有String类型和Throwable类型参数的构造函数
// 用于传递异常信息和导致异常的原始异常。它调用了父类Exception的带有String类型和Throwable类型参数的构造函数。
super(paramString, paramThrowable);
}
}