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
c55636e2
Commit
c55636e2
authored
Jan 02, 2016
by
John Chodera (MSKCC)
Browse files
Refine error message on reading file.
parent
7b767ce4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+3
-3
No files found.
wrappers/python/simtk/openmm/app/forcefield.py
View file @
c55636e2
...
@@ -145,11 +145,11 @@ class ForceField(object):
...
@@ -145,11 +145,11 @@ class ForceField(object):
# TODO: Also handle case where fallback to 'data' directory encounters problems,
# TODO: Also handle case where fallback to 'data' directory encounters problems,
# but this is much less worrisome because we control those files.
# but this is much less worrisome because we control those files.
msg
=
str
(
e
)
+
'
\n
'
msg
=
str
(
e
)
+
'
\n
'
if
hasattr
(
file
,
'
clos
e'
):
if
hasattr
(
file
,
'
nam
e'
):
filename
=
file
.
name
filename
=
file
.
name
else
:
else
:
filename
=
file
filename
=
str
(
file
)
msg
+=
'
ForceField.loadFile() encountered an error reading file
:
%s'
%
filename
msg
+=
"
ForceField.loadFile() encountered an error reading file
'
%s'
\n
"
%
filename
raise
Exception
(
msg
)
raise
Exception
(
msg
)
root
=
tree
.
getroot
()
root
=
tree
.
getroot
()
...
...
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