Error handling
By default, warnings and errors related to your code are logged to the console. Skript-mirror also offers additional tools that give you more control over how errors are handled.

Adding try before a Java call prevents errors from being logged to the console.
set {_second item in list} to try {_list}.get(1)
try {_connection}.setUseCaches(true)
If an error occurs, the error object can still be accessed programmatically.

In some cases, you may want to handle errors yourself, either to do your own error logging or to perform an alternate task in case of a failure.

[the] [last] [java] (throwable|exception|error)
Returns the last error object thrown by a java call. If there was an issue resolving the method or converting its output, it may be a com.btk5h.skriptmirror.JavaCallException.
Copy link
On this page
Suppressing errors
Programmatic access
Error object