mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
* first action! (#1)
This commit is contained in:
parent
8deacc95b1
commit
ace1e6a69a
3750 changed files with 1155519 additions and 0 deletions
43
node_modules/js-yaml/lib/js-yaml/exception.js
generated
vendored
Normal file
43
node_modules/js-yaml/lib/js-yaml/exception.js
generated
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
// 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;
|
Loading…
Add table
Add a link
Reference in a new issue