Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
252b2b50
Commit
252b2b50
authored
Jan 22, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix display of simpy3 exceptions in the GUI
parent
592e72cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
dream/platform/__init__.py
dream/platform/__init__.py
+9
-2
No files found.
dream/platform/__init__.py
View file @
252b2b50
...
...
@@ -32,6 +32,7 @@ from dream.plugins.plugin import PluginRegistry
import
os.path
import
logging
import
simpy
from
flask
import
Flask
,
jsonify
,
redirect
,
url_for
from
flask
import
request
...
...
@@ -135,8 +136,14 @@ def _runSimulation(parameter_dict):
try
:
registry
=
PluginRegistry
(
app
.
logger
,
parameter_dict
)
return
dict
(
success
=
True
,
data
=
registry
.
run
(
parameter_dict
))
except
Exception
,
e
:
tb
=
traceback
.
format_exc
()
except
Exception
:
# Use simpy._compat to format exception chain in python2
if
hasattr
(
simpy
.
_compat
,
'format_chain'
):
exc_type
,
exc_value
,
exc_traceback
=
sys
.
exc_info
()
tb
=
''
.
join
(
simpy
.
_compat
.
format_chain
(
exc_type
,
exc_value
,
exc_traceback
))
else
:
assert
sys
.
version_info
[
0
]
==
3
tb
=
traceback
.
format_exc
()
app
.
logger
.
error
(
tb
)
return
dict
(
error
=
tb
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment