Skip to content

Commit

Permalink
Show meaningful error message in benchmark tool (#7990)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsoulanille committed Oct 3, 2023
1 parent 89a0b8f commit ac9519e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions e2e/benchmarks/model_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ async function loadModelByUrlWithState(modelUrl, loadOptions = {}, state = {}) {
const artifacts = await ioHandler.load();
modelType = artifacts.format;
} catch (e) {
throw new Error(`Failed to fetch or parse 'model.json' file.`);
console.error(`Failed to fetch or parse 'model.json' file.`);
throw e;
}

// load models
Expand All @@ -649,7 +650,8 @@ async function loadModelByUrlWithState(modelUrl, loadOptions = {}, state = {}) {
model = await tryAllLoadingMethods(ioHandler, loadOptions, state);
}
} catch (e) {
throw new Error('Failed to load the model.');
console.error('Failed to load the model.');
throw e;
}

return model;
Expand Down

0 comments on commit ac9519e

Please sign in to comment.