Skip to content

Commit

Permalink
dev: format oogavm-errors.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JothamWong committed Apr 3, 2024
1 parent bd7a302 commit 09f2148
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/vm/oogavm-errors.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
// Collection of ooga errors to distinguish ooga-lang errors from typescript errors.
export class OogaError extends Error {
constructor(msg: string) {
super(msg);
}
constructor(msg: string) {
super(msg);
}
}

export class ParseError extends OogaError {

}
export class ParseError extends OogaError {}

export class HeapError extends OogaError {
constructor(msg: string) {
super(msg);
}
constructor(msg: string) {
super(msg);
}
}

// HeapOutOfMemoryError is an error that might be fixable.
export class HeapOutOfMemoryError extends OogaError {
constructor() {
super("Out of memory!");
}
constructor() {
super('Out of memory!');
}
}

// No more memory and cannot save. OOGA!
export class HeapDeadError extends OogaError {
constructor() {
super("Out of memory!");
}
constructor() {
super('Out of memory!');
}
}

0 comments on commit 09f2148

Please sign in to comment.