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.
tsrxns/src/gtask/exception/NetworkFailureException.java

34 lines
1.5 KiB

/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* 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
*
* 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;
//网络异常检测检测和处理
public class NetworkFailureException extends Exception {
private static final long serialVersionUID = 2107610287180234136L; //异常版本ID
public NetworkFailureException() { //重写并调用超类方法,
super(); //当网络操作失败且没有特定的错误信息需要传达时,可以使用这个构造函数抛出异常。
}
public NetworkFailureException(String paramString) {
super(paramString); //网络发生异常,需要传递相关排除异常的详细信息,有助于了解和解决异常
}
public NetworkFailureException(String paramString, Throwable paramThrowable) {
super(paramString, paramThrowable); //获得易于理解的错误描述,还能跟踪到原始的异常堆栈信息,有利于问题排查
}
}