📄 mimeexception.java
字号:
package org.lazybug.mime;
import java.io.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class MimeException extends IOException
{
private IOException next;
public MimeException()
{
}
public MimeException(String s)
{
super(s);
}
public MimeException(String s, IOException exception)
{
super(s);
next = exception;
}
public Exception getNextException()
{
return next;
}
public synchronized boolean setNextException(IOException exception)
{
Object obj;
for(obj = this; (obj instanceof MimeException) && ((MimeException)obj).next != null; obj = ((MimeException)obj).next);
if(obj instanceof MimeException)
{
((MimeException)obj).next = exception;
return true;
} else
{
return false;
}
}
public String getMessage()
{
if(next == null)
return super.getMessage();
Exception exception = next;
String s = super.getMessage();
StringBuffer stringbuffer = new StringBuffer(s != null ? s : "");
while(exception != null)
{
stringbuffer.append(";\n nested exception is:\n\t");
if(exception instanceof MimeException)
{
MimeException messagingexception = (MimeException)exception;
stringbuffer.append(exception.getClass().toString());
String s1 = messagingexception.getSuperMessage();
if(s1 != null)
{
stringbuffer.append(": ");
stringbuffer.append(s1);
}
exception = messagingexception.next;
} else
{
stringbuffer.append(exception.toString());
exception = null;
}
}
return stringbuffer.toString();
}
private String getSuperMessage()
{
return super.getMessage();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -