[Kst] branches/work/kst/1.6/kst/src/extensions/js
Andrew Walker
arwalker at sumusltd.com
Wed Nov 14 20:07:28 CET 2007
SVN commit 736757 by arwalker:
start adding more useful error message
M +1 -1 bind_arrow.cpp
M +2 -0 bind_box.cpp
M +2 -0 bind_line.cpp
M +1 -0 kstbinding.h
--- branches/work/kst/1.6/kst/src/extensions/js/bind_arrow.cpp #736756:736757
@@ -178,7 +178,7 @@
return (this->*arrowProperties[i].get)(exec);
}
}
-
+
return KstBindLine::get(exec, propertyName);
}
--- branches/work/kst/1.6/kst/src/extensions/js/bind_box.cpp #736756:736757
@@ -294,6 +294,8 @@
d->setCornerStyle(Qt::RoundJoin);
break;
default:
+ KJS::Object eobj = KJS::Error::create(exec, KJS::SyntaxError, "Value is out of range.");
+ exec->setException(eobj);
return;
}
KstApp::inst()->paintAll(KstPainter::P_PAINT);
--- branches/work/kst/1.6/kst/src/extensions/js/bind_line.cpp #736756:736757
@@ -376,6 +376,8 @@
d->setPenStyle(Qt::DashDotDotLine);
break;
default:
+ KJS::Object eobj = KJS::Error::create(exec, KJS::SyntaxError, "Value is out of range.");
+ exec->setException(eobj);
return;
}
KstApp::inst()->paintAll(KstPainter::P_PAINT);
--- branches/work/kst/1.6/kst/src/extensions/js/kstbinding.h #736756:736757
@@ -60,6 +60,7 @@
static KstBaseCurveList extractCurveList(KJS::ExecState*, const KJS::Value&, bool doThrow = true);
protected:
+ QString name() const { return _name; }
KstBinding(const QString& name, int id);
private:
More information about the Kst
mailing list