catch log
This commit is contained in:
parent
647a550106
commit
2a98e74847
@ -2603,6 +2603,7 @@ control.prototype.playSound = function (sound) {
|
||||
source.noteOn(0);
|
||||
}
|
||||
catch (ee) {
|
||||
console.log(ee);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,6 +136,7 @@ loader.prototype.loadAnimates = function () {
|
||||
image.src = t2;
|
||||
data.images.push(image);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
data.images.push(null);
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,7 +151,9 @@ utils.prototype.getLocalStorage = function(key, defaultValue) {
|
||||
try {
|
||||
return JSON.parse(output);
|
||||
}
|
||||
catch (ee) {}
|
||||
catch (ee) {
|
||||
// Ignore, use default value
|
||||
}
|
||||
}
|
||||
return JSON.parse(value);
|
||||
}
|
||||
|
||||
19
main.js
19
main.js
@ -313,7 +313,7 @@ main.prototype.listen = function () {
|
||||
window.onresize = function () {
|
||||
try {
|
||||
main.core.resize(main.dom.body.clientWidth, main.dom.body.clientHeight);
|
||||
}catch (e) {}
|
||||
}catch (e) { console.log(e); }
|
||||
}
|
||||
|
||||
////// 在界面上按下某按键时 //////
|
||||
@ -321,7 +321,7 @@ main.dom.body.onkeydown = function(e) {
|
||||
try {
|
||||
if (main.core.isPlaying() || main.core.status.lockControl)
|
||||
main.core.onkeyDown(e);
|
||||
} catch (ee) {}
|
||||
} catch (ee) { console.log(ee); }
|
||||
}
|
||||
|
||||
////// 在界面上放开某按键时 //////
|
||||
@ -329,7 +329,7 @@ main.dom.body.onkeyup = function(e) {
|
||||
try {
|
||||
if (main.core.isPlaying() || main.core.status.lockControl)
|
||||
main.core.onkeyUp(e);
|
||||
} catch (ee) {}
|
||||
} catch (ee) { console.log(ee); }
|
||||
}
|
||||
|
||||
////// 开始选择时 //////
|
||||
@ -344,7 +344,7 @@ main.dom.data.onmousedown = function (e) {
|
||||
var loc = main.core.getClickLoc(e.clientX, e.clientY);
|
||||
if (loc == null) return;
|
||||
main.core.ondown(loc);
|
||||
} catch (ee) {}
|
||||
} catch (ee) { console.log(ee); }
|
||||
}
|
||||
|
||||
////// 鼠标移动时 //////
|
||||
@ -354,14 +354,14 @@ main.dom.data.onmousemove = function (e) {
|
||||
var loc = main.core.getClickLoc(e.clientX, e.clientY);
|
||||
if (loc == null) return;
|
||||
main.core.onmove(loc);
|
||||
}catch (ee) {}
|
||||
}catch (ee) { console.log(ee); }
|
||||
}
|
||||
|
||||
////// 鼠标放开时 //////
|
||||
main.dom.data.onmouseup = function () {
|
||||
try {
|
||||
main.core.onup();
|
||||
}catch (e) {}
|
||||
}catch (e) { console.log(e); }
|
||||
}
|
||||
|
||||
////// 鼠标滑轮滚动时 //////
|
||||
@ -371,7 +371,7 @@ main.dom.data.onmousewheel = function(e) {
|
||||
main.core.onmousewheel(Math.sign(e.wheelDelta))
|
||||
else if (e.detail)
|
||||
main.core.onmousewheel(Math.sign(e.detail));
|
||||
} catch (ee) {}
|
||||
} catch (ee) { console.log(ee); }
|
||||
}
|
||||
|
||||
////// 手指在触摸屏开始触摸时 //////
|
||||
@ -381,7 +381,7 @@ main.dom.data.ontouchstart = function (e) {
|
||||
var loc = main.core.getClickLoc(e.targetTouches[0].clientX, e.targetTouches[0].clientY);
|
||||
if (loc == null) return;
|
||||
main.core.ondown(loc);
|
||||
}catch (ee) {}
|
||||
}catch (ee) { console.log(ee); }
|
||||
}
|
||||
|
||||
////// 手指在触摸屏上移动时 //////
|
||||
@ -391,7 +391,7 @@ main.dom.data.ontouchmove = function (e) {
|
||||
var loc = main.core.getClickLoc(e.targetTouches[0].clientX, e.targetTouches[0].clientY);
|
||||
if (loc == null) return;
|
||||
main.core.onmove(loc);
|
||||
}catch (ee) {}
|
||||
}catch (ee) { console.log(ee); }
|
||||
}
|
||||
|
||||
////// 手指离开触摸屏时 //////
|
||||
@ -400,6 +400,7 @@ main.dom.data.ontouchend = function (e) {
|
||||
e.preventDefault();
|
||||
main.core.onup();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user