This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
ScriptCraft/scriptcraft/src/main/java/com/thebrokenrail/scriptcraft/core/quickjs/JSException.java

18 lines
458 B
Java
Raw Normal View History

2020-04-28 00:15:24 +00:00
package com.thebrokenrail.scriptcraft.core.quickjs;
2020-04-25 13:33:17 +00:00
2020-06-07 21:58:49 +00:00
import java.io.PrintWriter;
import java.io.StringWriter;
2020-04-25 13:33:17 +00:00
public class JSException extends Exception {
public JSException(String message) {
super(message);
}
2020-06-07 21:58:49 +00:00
@SuppressWarnings("unused")
2020-08-26 21:52:17 +00:00
public static String getStackTrace(Throwable e) {
2020-06-07 21:58:49 +00:00
StringWriter writer = new StringWriter();
e.printStackTrace(new PrintWriter(writer));
return writer.toString();
}
2020-04-25 13:33:17 +00:00
}