[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [vidalia/alpha] Add more checks to the plugin engine
commit bab083b3e21b5c1dfebbb3de478568d11ba4947f
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
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);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits