479ba88791de268eddf9463b5b5179062032103f
[platform/framework/web/crosswalk-tizen.git] /
1 'use strict';
2
3
4 function YAMLException(reason, mark) {
5   this.name    = 'YAMLException';
6   this.reason  = reason;
7   this.mark    = mark;
8   this.message = this.toString(false);
9 }
10
11
12 YAMLException.prototype.toString = function toString(compact) {
13   var result;
14
15   result = 'JS-YAML: ' + (this.reason || '(unknown reason)');
16
17   if (!compact && this.mark) {
18     result += ' ' + this.mark.toString();
19   }
20
21   return result;
22 };
23
24
25 module.exports = YAMLException;