Added try/catch so script errors during rendering don't result in crashes

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@312 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-30 14:15:09 +00:00
parent 5424c60b39
commit d463b277c3
+5 -1
View File
@@ -47,7 +47,11 @@ void DataViewer::draw(RotatedDC& dc, const Color& background) {
// draw values
FOR_EACH(v, viewers) { // draw low z index fields first
if (v->getStyle()->visible) {// visible
drawViewer(dc, *v);
try {
drawViewer(dc, *v);
} catch (const Error& e) {
handle_error(e, false, false);
}
}
}
}