mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: 可调的性能设置
This commit is contained in:
1 parent
8c8dcb89eb
commit
2bf1a18890
21 files changed
+237
-274
No files matched your search
@@ -1,15 +1,13 @@
|
||||
import { CompileErrorInfo } from './interface';
|
||||
import { STATUS_TEXTS } from './status';
|
||||
|
||||
export class CompileError extends Error {
|
||||
stdout: string;
|
||||
|
||||
stderr: string;
|
||||
|
||||
status: string;
|
||||
|
||||
type: string;
|
||||
|
||||
constructor(obj) {
|
||||
constructor(obj: string | CompileErrorInfo) {
|
||||
super('Compile Error');
|
||||
if (typeof obj === 'string') {
|
||||
this.stdout = obj;
|
||||
@@ -25,10 +23,9 @@ export class CompileError extends Error {
|
||||
|
||||
export class FormatError extends Error {
|
||||
type: string;
|
||||
|
||||
params: any[];
|
||||
|
||||
constructor(message, params = []) {
|
||||
constructor(message: string, params = []) {
|
||||
super(message);
|
||||
this.type = 'FormatError';
|
||||
this.params = params;
|
||||
@@ -37,10 +34,9 @@ export class FormatError extends Error {
|
||||
|
||||
export class RuntimeError extends Error {
|
||||
type: string;
|
||||
|
||||
detail: any;
|
||||
|
||||
constructor(detail, message) {
|
||||
constructor(detail: string, message: string) {
|
||||
super(message);
|
||||
this.type = 'RuntimeError';
|
||||
this.detail = detail;
|
||||
@@ -49,7 +45,6 @@ export class RuntimeError extends Error {
|
||||
|
||||
export class SystemError extends Error {
|
||||
type: string;
|
||||
|
||||
params: any[];
|
||||
|
||||
constructor(message: string, params = []) {
|
||||
|
||||
Reference in new issue
Block a user