mirror of https://github.com/vladmandic/human
add exception handlers to all demos
parent
f26dae059e
commit
ed0fbd6e3c
|
@ -11,6 +11,7 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
|||
|
||||
### **HEAD -> main** 2021/04/25 mandic00@live.com
|
||||
|
||||
- major update for 1.8 release candidate
|
||||
|
||||
### **origin/main** 2021/04/25 mandic00@live.com
|
||||
|
||||
|
|
3
TODO.md
3
TODO.md
|
@ -34,6 +34,3 @@ Build:
|
|||
- Build NodeJS deliverables in non-minified form
|
||||
|
||||
### TBD
|
||||
|
||||
- Remove modelPaths
|
||||
- NodeJS Exception handling
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
<span id="desc" style="visibility: hidden; font-size: 0.4rem;"></span><br>
|
||||
</div>
|
||||
<div style="height: 10px"></div>
|
||||
<div id="list" style="height: 10px"></div>
|
||||
Extracted Faces - click on a face to sort by similarity and get a known face match:<br>
|
||||
<div id="faces"></div>
|
||||
</div>
|
||||
|
|
|
@ -168,6 +168,13 @@ async function createDB() {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
window.addEventListener('unhandledrejection', (evt) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(evt.reason || evt);
|
||||
document.getElementById('list').innerHTML = evt?.reason?.message || evt?.reason || evt;
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
||||
// pre-load human models
|
||||
await human.load();
|
||||
|
||||
|
|
|
@ -588,6 +588,14 @@ async function drawWarmup(res) {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
window.addEventListener('unhandledrejection', (evt) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(evt.reason || evt);
|
||||
document.getElementById('log').innerHTML = evt?.reason?.message || evt?.reason || evt;
|
||||
status('exception error');
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
||||
log('demo starting ...');
|
||||
|
||||
// parse url search params
|
||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
|||
Subproject commit 906244487754b61fd24f49fe2db91ea68264137d
|
||||
Subproject commit 11c9fd09a38aa5876a13befb41012e8997ba84c9
|
Loading…
Reference in New Issue