Skip to content

Commit

Permalink
fix: better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Jan 31, 2025
1 parent fe55ac1 commit 9788cfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ovos_padatious/simple_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def from_file(cls, name, prefix):
if not prefix.endswith(".intent"):
prefix += '.intent'
if not os.path.isfile(str(prefix + '.net')):
raise RuntimeError(f"intent not yet trained! '{prefix}.net'")
raise FileNotFoundError(f"intent not yet trained! '{prefix}.net'")
self = cls(name)
self.net = fann.neural_net()
if not self.net.create_from_file(str(prefix + '.net')): # Must have str()
Expand Down

0 comments on commit 9788cfe

Please sign in to comment.