Function newPlatformError

  • Creates a new PlatformError object. If no argument is provided, a PlatformError object with an empty message is returned.

    Parameters

    • Optionalerror: unknown

      The error message as a string, an Error object, or a value to assign to the cause property of the returned PlatformError object

    Returns PlatformError

    A new PlatformError object