Task #38284

Improve exception handling

Added by Karsten Dambekalns about 3 years ago. Updated about 3 years ago.

Status:New Start date:2012-06-22
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:JavaScript
Target version:-

Description

As recognized with https://review.typo3.org/12030 something like in https://gist.github.com/2966975 should be added:

function TYPO3Exception(message, code) {
  this.message = message;
  this.code = code;
  this.toString = function() {
    return this.message + ' (#' + this.code + ')';
  };
}
throw new TYPO3Exception('error message', 123456789);

Maybe add a wrapper function like Ember.assert with a syntax like Ember.assert({message: 'error message', code: 123456789}, false);

Also available in: Atom PDF