You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Pupistry is a bit of a mix of using return codes and using exceptions. We should fix it to properly do exception handling everywhere and dump the use of return codes for success/failure.
The text was updated successfully, but these errors were encountered:
As a first step, you may want to create an Exception object that encapsulates the return codes, and implement helper methods that allow it to be used in-place throughout your code.
e.g.
def ==(other)
other == @err_code
end
I have a feeling something similar may have already been written in one of the IO classes that you could sub-class + extend effectively.
Good idea - got to do something, I hacked in using return codes everywhere and every time I look at the code it now fills me with unlimited amounts of shame and regret.
Currently Pupistry is a bit of a mix of using return codes and using exceptions. We should fix it to properly do exception handling everywhere and dump the use of return codes for success/failure.
The text was updated successfully, but these errors were encountered: