fix: disable server error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-03-31 14:53:23 +08:00
parent a2c3eff622
commit ec65d00f28
7 changed files with 21 additions and 15 deletions

View File

@ -39,10 +39,10 @@ export class Parser {
return '4"encode error"'
}
}
console.debug(`encoded ${origin} as ${str}`);
console.trace(`encoded ${origin} as ${str}`);
return str;
}
tryStringify(str) {
tryStringify(str: any) {
try {
return JSON.stringify(str);
} catch (e) {
@ -136,11 +136,11 @@ export class Parser {
}
}
console.debug(`decoded ${str} as ${JSON.stringify(p)}`);
console.trace(`decoded ${str} as ${JSON.stringify(p)}`);
return p;
}
tryParse(str) {
tryParse(str: string) {
try {
return JSON.parse(str);
} catch (e) {