[tor-commits] [vidalia/alpha] Add more checks to the plugin engine
chiiph at torproject.org
chiiph at torproject.org
Sat Dec 24 20:54:40 UTC 2011
commit bab083b3e21b5c1dfebbb3de478568d11ba4947f
Author: Tomás Touceda <chiiph at torproject.org>
Date: Fri Oct 7 02:19:11 2011 -0300
Add more checks to the plugin engine
To better debug problems, add one more check for exceptions and added the
actual error message from the exception.
---
src/vidalia/plugin/PluginWrapper.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/vidalia/plugin/PluginWrapper.cpp b/src/vidalia/plugin/PluginWrapper.cpp
index c74ef7b..476b1db 100644
--- a/src/vidalia/plugin/PluginWrapper.cpp
+++ b/src/vidalia/plugin/PluginWrapper.cpp
@@ -38,6 +38,7 @@ PluginWrapper::PluginWrapper(const QString &info_path, PluginEngine *engine, QOb
if(res.state() == QScriptSyntaxCheckResult::Valid) {
DebugDialog::outputDebug("Everything's ok, evaluating...");
_engine->evaluate(contents);
+ checkExceptions();
} else {
DebugDialog::syntaxDebug(tr("%4: ERROR: Line: %1 - Column: %2\n%3")
.arg(res.errorLineNumber())
@@ -154,8 +155,8 @@ PluginWrapper::checkExceptions()
{
if(_engine->hasUncaughtException()) {
DebugDialog::exceptDebug(tr("%2:\n*** Exception in line %1")
- .arg(_engine->uncaughtExceptionLineNumber())
- .arg(name()));
+ .arg(_engine->uncaughtExceptionLineNumber())
+ .arg(_engine->uncaughtException().toString()));
DebugDialog::exceptDebug(tr("*** Backtrace:"));
foreach(QString line, _engine->uncaughtExceptionBacktrace()) {
vInfo(line);
More information about the tor-commits
mailing list