Vendetta/API/err handle

From Quasar-RCE
Jump to navigationJump to search

tbd

Definition

lib.err_handle(boolean conditional, string message) :: nil

Description

Functions similar to Assert, but only logs the error with traceback when the conditional is wrong.

Arguments

  1. boolean conditional: the condition to test for a handled error
  2. string message: the message to log alongside the stack traceback

Returns

  1. False for no error, true for an error

Other notes

  • Created in LME 3.1.x
  • This function is used by Neoloader internally, to capture errors during startup that would otherwise cause the game to close. For normal plugins, Assert() should be fine.
  • A global Neoloader setting can allow err_handle to error(), if desired. The error() is only triggered after the "PLUGINS_LOADED" event is triggered.
  • This function sends a "handled error" notification; the resulting behavior of that will depend on your active management engine