Sha256: 58d704471a3e353e35978c5575d2046d2f2418960ee8dcf3c0f2abc5e3474952

Contents?: true

Size: 1 KB

Versions: 108

Compression:

Stored size: 1 KB

Contents

// YAML error class. http://stackoverflow.com/questions/8458984
//
'use strict';

function YAMLException(reason, mark) {
  // Super constructor
  Error.call(this);

  this.name = 'YAMLException';
  this.reason = reason;
  this.mark = mark;
  this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : '');

  // Include stack trace in error object
  if (Error.captureStackTrace) {
    // Chrome and NodeJS
    Error.captureStackTrace(this, this.constructor);
  } else {
    // FF, IE 10+ and Safari 6+. Fallback for others
    this.stack = (new Error()).stack || '';
  }
}


// Inherit from Error
YAMLException.prototype = Object.create(Error.prototype);
YAMLException.prototype.constructor = YAMLException;


YAMLException.prototype.toString = function toString(compact) {
  var result = this.name + ': ';

  result += this.reason || '(unknown reason)';

  if (!compact && this.mark) {
    result += ' ' + this.mark.toString();
  }

  return result;
};


module.exports = YAMLException;

Version data entries

108 entries across 99 versions & 15 rubygems

Version Path
disco_app-0.18.4 test/dummy/node_modules/js-yaml/lib/js-yaml/exception.js
disco_app-0.18.4 test/dummy/node_modules/@rails/webpacker/node_modules/js-yaml/lib/js-yaml/exception.js
disco_app-0.18.1 test/dummy/node_modules/js-yaml/lib/js-yaml/exception.js
disco_app-0.18.1 test/dummy/node_modules/@rails/webpacker/node_modules/js-yaml/lib/js-yaml/exception.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/node_modules/js-yaml/lib/js-yaml/exception.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/js-yaml/lib/js-yaml/exception.js
disco_app-0.14.0 test/dummy/node_modules/@rails/webpacker/node_modules/js-yaml/lib/js-yaml/exception.js
disco_app-0.14.0 test/dummy/node_modules/js-yaml/lib/js-yaml/exception.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/js-yaml/lib/js-yaml/exception.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/node_modules/js-yaml/lib/js-yaml/exception.js
appmap-0.66.2 ./node_modules/js-yaml/lib/js-yaml/exception.js
appmap-0.66.1 ./node_modules/js-yaml/lib/js-yaml/exception.js
appmap-0.66.0 ./node_modules/js-yaml/lib/js-yaml/exception.js
appmap-0.65.1 ./node_modules/js-yaml/lib/js-yaml/exception.js
appmap-0.65.0 ./node_modules/js-yaml/lib/js-yaml/exception.js
appmap-0.64.0 ./node_modules/js-yaml/lib/js-yaml/exception.js
appmap-0.63.0 ./node_modules/js-yaml/lib/js-yaml/exception.js
appmap-0.62.1 ./node_modules/js-yaml/lib/js-yaml/exception.js
tang-0.2.1 spec/tang_app/node_modules/js-yaml/lib/js-yaml/exception.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/js-yaml/lib/js-yaml/exception.js