Class BSONOffsetErrorExperimental

Hierarchy (view full)

Constructors

  • Experimental

    Parameters

    • message: string
    • offset: number
    • Optionaloptions: {
          cause?: unknown;
      }
      • Optionalcause?: unknown

    Returns BSONOffsetError

Properties

cause?: unknown
message: string
offset: number
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Accessors

  • get name(): "BSONOffsetError"
  • Experimental

    Returns "BSONOffsetError"

Methods

  • Experimental

    Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

  • All errors thrown from the BSON library inherit from BSONError. This method can assist with determining if an error originates from the BSON library even if it does not pass an instanceof check against this class' constructor.

    Parameters

    • value: unknown

      any javascript value that needs type checking

    Returns value is BSONError