Interface ErrorHandler


public interface ErrorHandler

ErrorHandler interface for handling errors thrown when calling Excel functoins, macros, menus and ribbon actions.

A custom error handler can be configured in the jinx.ini file, for example:


 [JINX]
 error_handler = com.mycompany.myapp.ErrorHandler
 
Since:
2.0
  • Method Details

    • functionError

      Object functionError(String functionName, Method method, Throwable error)
      Called when an exception is thrown when calling a worksheet function or UDF.
      Parameters:
      functionName - Excel name of the function called.
      method - Java method mapped to the function.
      error - Exception thrown.
      Returns:
      Object to be returned to Excel. If null, an Excel error code will be used.
    • macroError

      Object macroError(String macroName, Method method, Throwable error)
      Called when an exception is thrown when calling a macro.
      Parameters:
      macroName - Excel name of the macro called.
      method - Java method mapped to the function.
      error - Exception thrown.
      Returns:
      Object to be returned to Excel. If null, an Excel error code will be used.
    • actionError

      void actionError(String actionName, Method method, Throwable error)
      Called when an exception is thrown calling an action.
      Parameters:
      actionName - Name of the action called.
      method - Java method mapped to the menu item.
      error - Exception thrown.