NAME

WebGPU::Direct::Error - Error objects produced by WebGPU::Direct

DESCRIPTION

Errors produced by WebGPU::Direct will be wrapped in a WebGPU::Direct::Error object. This contains the WebGPU error type and message as well as the previous perl exception. If Devel::StackTrace is available, the stack trace will be recorded.

Functions

webgpu_die($type, $message)

Convenience function to automate creation of and throwing WebGPU::Direct::Error objects.

  • Arguments

    • type

      The WebGPU type of the error

    • message

      The WebGPU message of the error

Constructor

new(type => $type, message => $message)

  • Arguments

    • type

      The WebGPU type of the error

    • message

      The WebGPU message of the error

Attributes

type

The WebGPU error type that was thrown.

message

The WebGPU error message that was thrown

previous_exception

The exception that was in $@ when the WebGPU::Direct::Error object was constructed.

trace

If Devel::StackTrace is installed, trace will have the Devel::StackTrace object of the stack when the object was constructed.

longmess

The longmess stack information from Carp generated when the object was constructed.

throw

die with this object. Equivalent to die $self.

as_string

The stringified version of this error.