From 818ad37678e478039a9eccf543e1049fcdf32566 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 3 Oct 2018 21:18:23 -0400 Subject: Rename fbs to msg. --- js/errors.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'js/errors.ts') 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 extends Error { - constructor(readonly kind: T, msg: string) { - super(msg); - this.name = fbs.ErrorKind[kind]; +export class DenoError 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 { +export function maybeError(base: msg.Base): null | DenoError { const kind = base.errorKind(); - if (kind === fbs.ErrorKind.NoError) { + if (kind === msg.ErrorKind.NoError) { return null; } else { return new DenoError(kind, base.error()!); -- cgit v1.2.3