mirror of
https://github.com/browsermt/bergamot-translator.git
synced 2024-09-11 05:35:33 +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 downloadAsArrayBuffer = async(url) => {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw Error(`HTTP ${response.status} - ${response.statusText}`);
|
throw Error(`Downloading ${url} failed: HTTP ${response.status} - ${response.statusText}`);
|
||||||
}
|
}
|
||||||
return response.arrayBuffer();
|
return response.arrayBuffer();
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ quiet-translation: true
|
|||||||
console.debug("Creating TranslationModel with config:", modelConfigWithoutModelAndShortList);
|
console.debug("Creating TranslationModel with config:", modelConfigWithoutModelAndShortList);
|
||||||
translationModel = new Module.TranslationModel(modelConfigWithoutModelAndShortList, alignedModelMemory, alignedShortlistMemory);
|
translationModel = new Module.TranslationModel(modelConfigWithoutModelAndShortList, alignedModelMemory, alignedShortlistMemory);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
log(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user