megapy/src
Ethan Dalool 62871e3240 Add separate classes for API exceptions, raise error_for_code().
This makes the caller's life easier. They can catch
mega.errors.EFAILED instead of catching mega.errors.RequestError
and checking the message attribute.
Because these classes inherit from RequestError, and they have a code
and message attribute, anyone currently catching RequestError should
not have any backwards compatibility issues.
Furthermore, this fixes an existing issue in the codebase where
RequestError is raised with a custom string message, which was causing
IndexError since that message wasn't in CODE_TO_DESCRIPTIONS.
2020-03-23 18:54:29 -07:00
..
mega Add separate classes for API exceptions, raise error_for_code(). 2020-03-23 18:54:29 -07:00
tests Fixes download, updated download methods to return downloded path instead of None 2019-11-12 09:49:57 +00:00