Author: janne.t.harkonen
Date: Thu Sep 25 06:49:10 2008
New Revision: 833
Modified:
trunk/src/robot/errors.py
trunk/src/robot/utils/error.py
Log:
added remote traceback for RemoteError
Modified: trunk/src/robot/errors.py
==============================================================================
--- trunk/src/robot/errors.py (original)
+++ trunk/src/robot/errors.py Thu Sep 25 06:49:10 2008
@@ -47,3 +47,7 @@
class RemoteError(RobotError):
"""Used by Remote library to report remote errors"""
+ def __init__(self, message, traceback):
+ RobotError.__init__(self, message)
+ self.traceback = traceback
+
Modified: trunk/src/robot/utils/error.py
==============================================================================
--- trunk/src/robot/utils/error.py (original)
+++ trunk/src/robot/utils/error.py Thu Sep 25 06:49:10 2008
@@ -68,7 +68,7 @@
details = _get_java_details(exc_value)
else:
message = _get_python_message(exc_type, exc_value)
- details = _get_python_details(exc_type, exc_traceback)
+ details = _get_python_details(exc_value, exc_traceback)
return message, details
@@ -129,9 +129,11 @@
return _format_message(name, msg)
-def _get_python_details(exc_type, exc_tb):
- if exc_type in (DataError, RemoteError, TimeoutError):
+def _get_python_details(exc_value, exc_tb):
+ if isinstance(exc_value, (DataError, TimeoutError)):
return ''
+ if isinstance(exc_value, RemoteError):
+ return exc_value.traceback
tb = traceback.extract_tb(exc_tb)
for row, (path, _, func, _) in enumerate(tb):
if path.endswith(_ignore_trace_until[0]) and func ==
_ignore_trace_until[1]: