mirror of
https://github.com/browsermt/bergamot-translator.git
synced 2024-10-26 05:43:59 +03:00
Better error logging for wasm test page
This commit is contained in:
parent
3525af6a45
commit
2788116f8b
@ -65,7 +65,7 @@ En consecuencia, durante el año 2011 se introdujeron 180 proyectos de ley que r
|
||||
const downloadAsArrayBuffer = async(url) => {
|
||||
const response = await fetch(url);
|
||||
if (!response.ok) {
|
||||
throw Error(`HTTP ${response.status} - ${response.statusText}`);
|
||||
throw Error(`Downloading ${url} failed: HTTP ${response.status} - ${response.statusText}`);
|
||||
}
|
||||
return response.arrayBuffer();
|
||||
}
|
||||
@ -156,7 +156,7 @@ quiet-translation: true
|
||||
console.debug("Creating TranslationModel with config:", modelConfigWithoutModelAndShortList);
|
||||
translationModel = new Module.TranslationModel(modelConfigWithoutModelAndShortList, alignedModelMemory, alignedShortlistMemory);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
log(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user