getErrorProps MethodStatic
Returns a new ErrorProps
object representing an unknown error value. Useful for logging or wrapping/re-throwing caught errors.
getErrorProps(error: unknown): ErrorProps
@note Unlike Error
objects (which lose messages and call stacks when serialized to JSON), objects
returned by this are plain old JavaScript objects, and can be easily logged/serialized to JSON.
Parameter | Type | Description |
---|---|---|
error | unknown |
Returns - ErrorProps
Defined in
- core/bentley/lib/cjs/BentleyError.d.ts Line 334
Last Updated: 08 August, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.