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/src/BentleyError.ts Line 696
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.