Mercurial Hosting > luan
comparison src/luan/LuanException.java @ 1596:a9ff30fb5d89
add Hosting.push_file
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 26 Mar 2021 20:10:44 -0600 |
parents | c922446f53aa |
children | a37ffe2d1b14 |
comparison
equal
deleted
inserted
replaced
1595:e4deb32bd233 | 1596:a9ff30fb5d89 |
---|---|
11 | 11 |
12 public final class LuanException extends Exception implements LuanMutable { | 12 public final class LuanException extends Exception implements LuanMutable { |
13 private LuanTable table; | 13 private LuanTable table; |
14 private Map extra = new HashMap(); | 14 private Map extra = new HashMap(); |
15 private boolean immutable = false; | 15 private boolean immutable = false; |
16 public boolean showCause = true; | |
16 | 17 |
17 public LuanException(String msg,Throwable cause) { | 18 public LuanException(String msg,Throwable cause) { |
18 super(msg,cause); | 19 super(msg,cause); |
19 } | 20 } |
20 | 21 |
124 } | 125 } |
125 | 126 |
126 public String getLuanStackTraceString() { | 127 public String getLuanStackTraceString() { |
127 StringBuilder sb = luanStackTrace(); | 128 StringBuilder sb = luanStackTrace(); |
128 Throwable cause = getCause(); | 129 Throwable cause = getCause(); |
129 if( cause != null ) | 130 if( showCause && cause != null ) |
130 sb.append( "\nCaused by: " ).append( getJavaStackTraceString(cause) ); | 131 sb.append( "\nCaused by: " ).append( getJavaStackTraceString(cause) ); |
131 return sb.toString(); | 132 return sb.toString(); |
132 } | 133 } |
133 | 134 |
134 @Override public void printStackTrace(PrintStream s) { | 135 @Override public void printStackTrace(PrintStream s) { |