improve parser exceptions
This commit is contained in:
parent
43c76aa073
commit
4e027c7784
1 changed files with 1 additions and 1 deletions
|
@ -41,6 +41,6 @@ class DieParser:
|
||||||
logging.debug(f"rolling die for {expression} -> result={result}")
|
logging.debug(f"rolling die for {expression} -> result={result}")
|
||||||
return result
|
return result
|
||||||
except tatsu.exceptions.FailedParse as e:
|
except tatsu.exceptions.FailedParse as e:
|
||||||
message = f"Failed to roll {expression}: {e.message}"
|
message = f"Failed to roll {expression}: {str(e)}"
|
||||||
self._logger.error(message)
|
self._logger.error(message)
|
||||||
raise ValueError(message) from e
|
raise ValueError(message) from e
|
||||||
|
|
Loading…
Reference in a new issue