mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-16 16:31:32 +00:00
Program elements and resolve infrastructure; Stdlib ideas; Restructuring
This commit is contained in:
20
std/error.ts
Normal file
20
std/error.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/// <reference path="../assembly.d.ts" />
|
||||
|
||||
@global()
|
||||
class Error {
|
||||
|
||||
message: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
@global()
|
||||
class RangeError extends Error {}
|
||||
|
||||
@global()
|
||||
class ReferenceError extends Error {}
|
||||
|
||||
@global()
|
||||
class TypeError extends Error {}
|
Reference in New Issue
Block a user