persona-community-5/.pnpm-store/v3/files/a3/a66ad4b8e1c0232cb54be138ddf9a7ecdcc9f150e883871e67814f53dc9ce854b4c0abfe58af18e019c7922cc7575a235ce087148172a110de45c4793abbff
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

53 lines
1.2 KiB
Plaintext

import Mark=require("./mark")
'use strict';
class YAMLException {
message:string
reason:string
name:string
mark:Mark
isWarning:boolean
private static CLASS_IDENTIFIER = "yaml-ast-parser.YAMLException";
public static isInstance(instance : any) : instance is YAMLException {
if(instance != null && instance.getClassIdentifier
&& typeof(instance.getClassIdentifier) == "function"){
for (let currentIdentifier of instance.getClassIdentifier()){
if(currentIdentifier == YAMLException.CLASS_IDENTIFIER) return true;
}
}
return false;
}
public getClassIdentifier() : string[] {
var superIdentifiers = [];
return superIdentifiers.concat(YAMLException.CLASS_IDENTIFIER);
}
constructor(reason:string, mark:Mark=null,isWarning=false) {
this.name = 'YAMLException';
this.reason = reason;
this.mark = mark;
this.message = this.toString(false);
this.isWarning = isWarning;
}
toString(compact:boolean=false){
var result;
result = 'JS-YAML: ' + (this.reason || '(unknown reason)');
if (!compact && this.mark) {
result += ' ' + this.mark.toString();
}
return result;
}
}
export=YAMLException