diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-10-03 21:18:23 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-10-04 00:25:55 -0400 |
commit | 818ad37678e478039a9eccf543e1049fcdf32566 (patch) | |
tree | 2f97738e66c8c0b25d7fb2caa32dcec4d4d644c4 /js/errors.ts | |
parent | f774953011cb3ad85914bc9f5f66aa121f00528d (diff) |
Rename fbs to msg.
Diffstat (limited to 'js/errors.ts')
-rw-r--r-- | js/errors.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/errors.ts b/js/errors.ts index d0254ef65..72fc5f23b 100644 --- a/js/errors.ts +++ b/js/errors.ts @@ -1,25 +1,25 @@ -import * as fbs from "gen/msg_generated"; +import * as msg from "gen/msg_generated"; export { ErrorKind } from "gen/msg_generated"; // @internal -export class DenoError<T extends fbs.ErrorKind> extends Error { - constructor(readonly kind: T, msg: string) { - super(msg); - this.name = fbs.ErrorKind[kind]; +export class DenoError<T extends msg.ErrorKind> extends Error { + constructor(readonly kind: T, errStr: string) { + super(errStr); + this.name = msg.ErrorKind[kind]; } } // @internal -export function maybeThrowError(base: fbs.Base): void { +export function maybeThrowError(base: msg.Base): void { const err = maybeError(base); if (err != null) { throw err; } } -export function maybeError(base: fbs.Base): null | DenoError<fbs.ErrorKind> { +export function maybeError(base: msg.Base): null | DenoError<msg.ErrorKind> { const kind = base.errorKind(); - if (kind === fbs.ErrorKind.NoError) { + if (kind === msg.ErrorKind.NoError) { return null; } else { return new DenoError(kind, base.error()!); |