Skip to content

Commit 2a2fdb8

Browse files
committed
utils/_object: fixed error arguments
1 parent a39f378 commit 2a2fdb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pymcnp/utils/_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def from_mcnp_file(cls, filename: pathlib.Path | str):
5353
filename = pathlib.Path(filename)
5454

5555
if not filename.is_file():
56-
raise errors.CliError(errors.CliCode.SEMANTICS_PATH)
56+
raise errors.CliError(errors.CliCode.SEMANTICS_PATH, filename)
5757

5858
source = filename.read_text()
5959

@@ -70,6 +70,6 @@ def to_mcnp_file(self, filename: str | pathlib.Path):
7070
filename = pathlib.Path(filename)
7171

7272
if not filename.is_file():
73-
raise errors.CliError(errors.CliCode.SEMANTICS_PATH)
73+
raise errors.CliError(errors.CliCode.SEMANTICS_PATH, filename)
7474

7575
filename.write_text(self.to_mcnp())

0 commit comments

Comments
 (0)