You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
816 B

4 years ago
  1. /*
  2. * @fileoverview Utilities for Doctrine
  3. * @author Yusuke Suzuki <utatane.tea@gmail.com>
  4. */
  5. (function () {
  6. 'use strict';
  7. var VERSION;
  8. VERSION = require('../package.json').version;
  9. exports.VERSION = VERSION;
  10. function DoctrineError(message) {
  11. this.name = 'DoctrineError';
  12. this.message = message;
  13. }
  14. DoctrineError.prototype = (function () {
  15. var Middle = function () { };
  16. Middle.prototype = Error.prototype;
  17. return new Middle();
  18. }());
  19. DoctrineError.prototype.constructor = DoctrineError;
  20. exports.DoctrineError = DoctrineError;
  21. function throwError(message) {
  22. throw new DoctrineError(message);
  23. }
  24. exports.throwError = throwError;
  25. exports.assert = require('assert');
  26. }());
  27. /* vim: set sw=4 ts=4 et tw=80 : */