Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
9f9cac52
Commit
9f9cac52
authored
Sep 09, 2013
by
peastman
Browse files
Merge pull request #133 from peastman/master
Handle exceptions correctly inside getState()
parents
559c7cff
44c8ea9c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
+14
-2
No files found.
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
View file @
9f9cac52
...
...
@@ -14,7 +14,13 @@
if
(
getForces
)
types
|=
State
::
Forces
;
if
(
getEnergy
)
types
|=
State
::
Energy
;
if
(
getParameters
)
types
|=
State
::
Parameters
;
try
{
state
=
self-
>
getState
(
types
,
enforcePeriodic
,
groups
)
;
}
catch
(
...
)
{
Py_END_ALLOW_THREADS
throw
;
}
Py_END_ALLOW_THREADS
return
_convertStateToLists
(
state
)
;
}
...
...
@@ -157,7 +163,13 @@ Parameters:
if
(
getForces
)
types
|=
State
::
Forces
;
if
(
getEnergy
)
types
|=
State
::
Energy
;
if
(
getParameters
)
types
|=
State
::
Parameters
;
try
{
state
=
self-
>
getState
(
copy
,
types
,
enforcePeriodic
,
groups
)
;
}
catch
(
...
)
{
Py_END_ALLOW_THREADS
throw
;
}
Py_END_ALLOW_THREADS
return
_convertStateToLists
(
state
)
;
}
...
...
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