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
acce09a5
Commit
acce09a5
authored
Sep 09, 2013
by
peastman
Browse files
Handle exceptions correctly inside getState()
parent
5719a05d
Changes
1
Hide 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 @
acce09a5
...
@@ -14,7 +14,13 @@
...
@@ -14,7 +14,13 @@
if
(
getForces
)
types
|=
State
::
Forces
;
if
(
getForces
)
types
|=
State
::
Forces
;
if
(
getEnergy
)
types
|=
State
::
Energy
;
if
(
getEnergy
)
types
|=
State
::
Energy
;
if
(
getParameters
)
types
|=
State
::
Parameters
;
if
(
getParameters
)
types
|=
State
::
Parameters
;
state
=
self-
>
getState
(
types
,
enforcePeriodic
,
groups
)
;
try
{
state
=
self-
>
getState
(
types
,
enforcePeriodic
,
groups
)
;
}
catch
(
...
)
{
Py_END_ALLOW_THREADS
throw
;
}
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
return
_convertStateToLists
(
state
)
;
return
_convertStateToLists
(
state
)
;
}
}
...
@@ -157,7 +163,13 @@ Parameters:
...
@@ -157,7 +163,13 @@ Parameters:
if
(
getForces
)
types
|=
State
::
Forces
;
if
(
getForces
)
types
|=
State
::
Forces
;
if
(
getEnergy
)
types
|=
State
::
Energy
;
if
(
getEnergy
)
types
|=
State
::
Energy
;
if
(
getParameters
)
types
|=
State
::
Parameters
;
if
(
getParameters
)
types
|=
State
::
Parameters
;
state
=
self-
>
getState
(
copy
,
types
,
enforcePeriodic
,
groups
)
;
try
{
state
=
self-
>
getState
(
copy
,
types
,
enforcePeriodic
,
groups
)
;
}
catch
(
...
)
{
Py_END_ALLOW_THREADS
throw
;
}
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
return
_convertStateToLists
(
state
)
;
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