Make scarpet internal and control flow exceptions stackless (#1392)
This commit is contained in:
1 parent
76861479e0
commit
80a5342776
5 files changed
+23
-4
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package carpet.script.exception;
|
||||
|
||||
/**
|
||||
* A type of {@link RuntimeException} that doesn't spend time producing and filling a stacktrace
|
||||
*/
|
||||
abstract class StacklessRuntimeException extends RuntimeException {
|
||||
public StacklessRuntimeException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public StacklessRuntimeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Throwable fillInStackTrace() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user