Package functions
Class MeosErrorHandler
java.lang.Object
functions.MeosErrorHandler
- All Implemented Interfaces:
error_handler_fn
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final Map<Integer, BiFunction<String, Integer, MeosException>> private static final ThreadLocal<int[]> The last error MEOS reported to the calling thread, as{code, level}.private static final ThreadLocal<String> private static final org.slf4j.Loggerstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidprivate static voidreportMeosException(int level, int code, String message)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
NOTICE
public static final int NOTICE- See Also:
-
WARNING
public static final int WARNING- See Also:
-
ERROR
public static final int ERROR- See Also:
-
MEOS_ERR_INTERNAL_ERROR
public static final int MEOS_ERR_INTERNAL_ERROR- See Also:
-
MEOS_ERR_INTERNAL_TYPE_ERROR
public static final int MEOS_ERR_INTERNAL_TYPE_ERROR- See Also:
-
MEOS_ERR_VALUE_OUT_OF_RANGE
public static final int MEOS_ERR_VALUE_OUT_OF_RANGE- See Also:
-
MEOS_ERR_DIVISION_BY_ZERO
public static final int MEOS_ERR_DIVISION_BY_ZERO- See Also:
-
MEOS_ERR_MEMORY_ALLOC_ERROR
public static final int MEOS_ERR_MEMORY_ALLOC_ERROR- See Also:
-
MEOS_ERR_AGGREGATION_ERROR
public static final int MEOS_ERR_AGGREGATION_ERROR- See Also:
-
MEOS_ERR_DIRECTORY_ERROR
public static final int MEOS_ERR_DIRECTORY_ERROR- See Also:
-
MEOS_ERR_FILE_ERROR
public static final int MEOS_ERR_FILE_ERROR- See Also:
-
MEOS_ERR_INVALID_ARG
public static final int MEOS_ERR_INVALID_ARG- See Also:
-
MEOS_ERR_INVALID_ARG_TYPE
public static final int MEOS_ERR_INVALID_ARG_TYPE- See Also:
-
MEOS_ERR_INVALID_ARG_VALUE
public static final int MEOS_ERR_INVALID_ARG_VALUE- See Also:
-
MEOS_ERR_FEATURE_NOT_SUPPORTED
public static final int MEOS_ERR_FEATURE_NOT_SUPPORTED- See Also:
-
MEOS_ERR_MFJSON_INPUT
public static final int MEOS_ERR_MFJSON_INPUT- See Also:
-
MEOS_ERR_MFJSON_OUTPUT
public static final int MEOS_ERR_MFJSON_OUTPUT- See Also:
-
MEOS_ERR_TEXT_INPUT
public static final int MEOS_ERR_TEXT_INPUT- See Also:
-
MEOS_ERR_TEXT_OUTPUT
public static final int MEOS_ERR_TEXT_OUTPUT- See Also:
-
MEOS_ERR_WKB_INPUT
public static final int MEOS_ERR_WKB_INPUT- See Also:
-
MEOS_ERR_WKB_OUTPUT
public static final int MEOS_ERR_WKB_OUTPUT- See Also:
-
MEOS_ERR_GEOJSON_INPUT
public static final int MEOS_ERR_GEOJSON_INPUT- See Also:
-
MEOS_ERR_GEOJSON_OUTPUT
public static final int MEOS_ERR_GEOJSON_OUTPUT- See Also:
-
EXCEPTION_MAP
-
LAST_ERROR
The last error MEOS reported to the calling thread, as{code, level}.MEOS raises an error on the thread that made the call and keeps its own error number in thread-local storage, so this mirror is per-thread too. One slot shared across threads lets a thread consume or clear an error raised on another, which loses the exception its caller was owed and hands it to whichever thread asks next.
-
LAST_MESSAGE
-
-
Constructor Details
-
MeosErrorHandler
public MeosErrorHandler()
-
-
Method Details
-
apply
- Specified by:
applyin interfaceerror_handler_fn
-
reportMeosException
-
checkError
public static void checkError()
-