UNPKG

oomph

Version:

Object Oriented javascript models for the client and the server

31 lines (24 loc) 914 B
// Generated by CoffeeScript 1.9.3 (function() { var ValidationError, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; ValidationError = (function(superClass) { extend(ValidationError, superClass); function ValidationError(message, args) { this.name = 'ValidationError'; this.message = message; if (args.attribute) { this.attribute = args.attribute; } if (args.expected) { this.expected = args.expected; } if (args.actual) { this.actual = args.actual; } } return ValidationError; })(Error); module.exports = ValidationError; }).call(this);