diff --git a/weboob/core/bcall.py b/weboob/core/bcall.py
index 6d5b0c1a..43eb8699 100644
--- a/weboob/core/bcall.py
+++ b/weboob/core/bcall.py
@@ -99,6 +99,7 @@ class BackendsCall(object):
else:
result = getattr(backend, function)(*args, **kwargs)
except Exception, error:
+ debug('%s: Called function %s raised an error: %r' % (backend, function, error))
self._store_error(backend, error)
else:
debug('%s: Called function %s returned: %r' % (backend, function, result))
diff --git a/weboob/tools/application/qt/qt.py b/weboob/tools/application/qt/qt.py
index 4e9a8e1b..2b56d4c0 100644
--- a/weboob/tools/application/qt/qt.py
+++ b/weboob/tools/application/qt/qt.py
@@ -16,10 +16,12 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import sys
+import logging
+import re
from PyQt4.QtCore import QTimer, SIGNAL, QObject, QString, QSize
from PyQt4.QtGui import QMainWindow, QApplication, QStyledItemDelegate, \
QStyleOptionViewItemV4, QTextDocument, QStyle, \
- QAbstractTextDocumentLayout, QPalette
+ QAbstractTextDocumentLayout, QPalette, QMessageBox
from weboob.core.ouiboube import Weboob
from weboob.core.scheduler import IScheduler
@@ -105,8 +107,26 @@ class QtDo(QObject):
def default_eb(self, backend, error, backtrace):
# TODO display a messagebox
- print error
- print backtrace
+ msg = u'%s' % error
+ if logging.root.level == logging.DEBUG:
+ msg += '
'
+ ul_opened = False
+ for line in backtrace.split('\n'):
+ m = re.match(' File (.*)', line)
+ if m:
+ if not ul_opened:
+ msg += '