improve parser exceptions

This commit is contained in:
Denis-Cosmin Nutiu 2024-01-21 23:04:35 +02:00
parent 43c76aa073
commit 4e027c7784

View file

@ -41,6 +41,6 @@ class DieParser:
logging.debug(f"rolling die for {expression} -> result={result}")
return result
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)
raise ValueError(message) from e