---
name: "JE::Object::Error"
section: "3pm"
platform: "linux"
package: "libje-perl"
version: "0.066-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/JE::Object::Error"
---

# JE::Object::Error(3pm)

JavaScript Error object class

## NAME

JE::Object::Error - JavaScript Error object class

## SYNOPSIS

```
  use JE::Object::Error;
  # Somewhere in code called by an eval{}
  die new JE::Object::Error $global, "(Error message here)";
  # Later:
  $@->prop('message');  # error message
  $@->prop('name');     # 'Error'
  "$@";                 # 'Error: ' plus the error message
```

## DESCRIPTION

This class implements JavaScript Error objects for JE. This is the base class for all JavaScript's native error objects. (See "SEE ALSO", below.)

## METHODS

See JE::Types for descriptions of most of the methods. Only what is specific to JE::Object::Error is explained here.

The `"value"` method returns the string 'Error: ' followed by the error message. 'Error' will be replaced with the class name (the result of  calling `"->class"`) for subclasses.

## SEE ALSO

- JE

  - JE::Object

  - JE::Object::Error::RangeError

  - JE::Object::Error::SyntaxError

  - JE::Object::Error::TypeError

  - JE::Object::Error::URIError

  - JE::Object::Error::ReferenceError
