Skip to content
Errors thrown by the Roole language
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
LICENSE
README.md
package.json

README.md

roole-error

Roole error objects

Installation

npm install roole-error;

Example

var RooleError = require('roole-error');
throw new RooleError('message', node);

The created error object will contain a loc property which comes from node.loc.

API

var err = new RooleError(msg, [node])

  • msg - A string of error message.
  • node - Optional. The node causing the error. If passed, the returned error object will contain the location info.
  • err - the created error object
Something went wrong with that request. Please try again.