0.4.0 • Published 12 years ago
util4js v0.4.0
util4js
The util4js library contains JavaScript utilities.
Installation
npm install util4js
API
Exception
Exception class is the base class for all exceptions.
Example
"use strict";
require("class4js");
var util4js = require("../lib/util4js.js");
var CustomException = $class({
__construct__: function () {
this.name = "CustomException";
}
}, util4js.Exception);
try {
throw new CustomException("Exception was raised");
} catch (ex) {
console.log(ex.name + ": " + ex.message);
}
License
This software is distributed under the terms of the GNU General Public License, version 3 (GPL-3.0).