print the value for out of bound error
Client: TypeError: Write error for play.toClient.entity_head_rotation.headYaw : value is out of bounds
is nice, but it would be nicer with the value.
I believe this is mostly about adding a try catch in https://github.com/roblabla/ProtoDef/blob/master/src/datatypes/numeric.js
try/catch are not optimizable in v8 so I'm not sure if that should be done at all.
you can optimize try/catch by making a special tryCatch function like so :
function tryCatch(tryfn, catchfn, finalizefn) {
try {
tryfn();
} catch (e) {
if (typeof catchfn === "function") catchfn(e);
} finally {
if (typeof finallyfn === "function") finallyfn();
}
}
Then calling that function will not degrade the performance of the rest of the function.
https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#2-unsupported-syntax