Skip to content

Commit

Permalink
use HetaLevelError
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Nov 17, 2023
1 parent 7a67fb5 commit 9d1d237
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Container, ModuleSystem } from 'heta-compiler/src/webpack';
import { Container, ModuleSystem, HetaLevelError } from 'heta-compiler/src/webpack';
import path from 'path';
import declarationSchema from 'heta-compiler/src/builder/declaration-schema.json';
import Ajv from 'ajv';
Expand Down Expand Up @@ -141,9 +141,7 @@ function build(inputDict, settings) { // modules, exports
let ms = new ModuleSystem(c.logger, (filename) => {
let arrayBuffer = inputDict[filename]; // Uint8Array
if (!arrayBuffer) {
let e = new Error(`Module ${filename} is not found.`);
e.name = 'HetaLevelError';
throw e;
throw new HetaLevelError(`Module ${filename} is not found.`);
}
let buffer = Buffer.from(arrayBuffer); // Buffer

Expand Down

0 comments on commit 9d1d237

Please sign in to comment.