#@jedevc Are there common conventions for
1 messages ยท Page 1 of 1 (latest)
do you mean specifically in php? or across different sdks?
Python: ```
class DaggerError(Exception):
"""Base exception for all Dagger exceptions."""
across SDKs
Rust: #[derive(Error, Debug)] pub enum DaggerError { #[error("failed to build dagger internal graph")]
uh, so in go there's no real base class for them, since that's not really how go works ๐
Yeah, that's fair enough
if it's possible to have a base exception for all dagger-y errors, i think that makes sense
It is possible, so I could do that ๐
there's no requirement to, it's just making the ergonomics for try-catching them a bit easier right?
you could catch all dagger-y errors
Yeah, it's common practice in a Python library to have a base exception, depends on the language's conventions. In our case it makes it easy to catch all dagger exceptions, like @elder quiver said, or to code in common behavior.
That's a good idea, I think I will implement similar soon
@olive tusk For Python, do you have any specific exceptions for end-users not formatting a module correctly?
More specifically, I am looking at making a clear exception for users who have not specified the subtype of their arrays on dagger functions
Ideally, I'll use the same name if it exists so it's easier for other maintainers to read.
Oh hold on, I think I found it: Is it a UserError?
(Sorry, Python is not my forte so I didn't spot it at first)