mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-05 10:04:55 +00:00
25 lines
578 B
Java
25 lines
578 B
Java
|
package com.bytezone.diskbrowser.applefile;
|
||
|
|
||
|
public class ErrorMessageFile extends AbstractFile
|
||
|
{
|
||
|
String text;
|
||
|
|
||
|
public ErrorMessageFile (String name, byte[] buffer, Exception e)
|
||
|
{
|
||
|
super (name, buffer);
|
||
|
|
||
|
StringBuilder text = new StringBuilder ();
|
||
|
text.append ("Oops! : " + e.toString () + "\n\n");
|
||
|
for (StackTraceElement ste : e.getStackTrace ())
|
||
|
text.append (ste + "\n");
|
||
|
if (text.length () > 0)
|
||
|
text.deleteCharAt (text.length () - 1);
|
||
|
this.text = text.toString ();
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getText ()
|
||
|
{
|
||
|
return text;
|
||
|
}
|
||
|
}
|