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
d942cf62
Commit
d942cf62
authored
Jun 05, 2025
by
Evan Pretti
Browse files
Reformat error message for XML load failure
parent
bfde67e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
wrappers/python/openmm/app/forcefield.py
wrappers/python/openmm/app/forcefield.py
+1
-3
No files found.
wrappers/python/openmm/app/forcefield.py
View file @
d942cf62
...
...
@@ -258,13 +258,11 @@ class ForceField(object):
raise
ValueError
(
'Could not locate file "%s"'
%
file
)
except
Exception
as
e
:
# Fail with an error message about which file could not be read.
msg
=
str
(
e
)
+
'
\n
'
if
hasattr
(
file
,
'name'
):
filename
=
file
.
name
else
:
filename
=
str
(
file
)
msg
+=
"ForceField.loadFile() encountered an error reading file '%s'
\n
"
%
filename
raise
Exception
(
msg
)
raise
Exception
(
'ForceField.loadFile() encountered an error reading file "%s": %s'
%
(
filename
,
e
))
trees
.
append
(
tree
)
i
+=
1
...
...
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