Returns the public error code of a thrown value: its ToolError code, else fallback.
ToolError
fallback
Returns the public error code of a thrown value: its
ToolErrorcode, elsefallback.