errors.js 444 B

1234567891011121314151617181920
  1. "use strict";
  2. /*
  3. do not use Class here - IE8 does not understand overloeded toString method (using Class.extend).
  4. var Class = require("rtl.js").Class;
  5. exports.Error = Class.extend({
  6. init: function CompileError(msg) {this.__msg = msg;},
  7. toString: function(){return this.__msg;}
  8. });
  9. */
  10. function CompileError(msg){
  11. this.__msg = msg;
  12. }
  13. CompileError.prototype.toString = function(){
  14. return this.__msg;
  15. };
  16. exports.Error = CompileError;