Commit 97083164 authored by Cyril Roelandt's avatar Cyril Roelandt
Browse files

Fix error messages for some exceptions.

parent 54f0bf68
......@@ -8,6 +8,10 @@ Based on [Keep a Changelog](
- colorlog is no longer a required dependency. It can be installed by using the
"color" extra.
### Fixed
- Fixed error messages for InvalidPackageNameError and
## [0.11.1] - 2021-05-02
### Fixed
- Add missing dependency on setuptools
......@@ -5,25 +5,25 @@
class InvalidPackageNameError(Exception):
"""Invalid package name or non-existing package."""
def __init__(self, backend, pkg_name):
self.backend = backend
def __init__(self, frontend, pkg_name):
self.frontend = frontend
self.pkg_name = pkg_name
def __str__(self):
return (f'The package {self.pkg_name} could not be found by backend '
return (f'The package {self.pkg_name} could not be found by frontend '
class InvalidPackageVersionError(Exception):
"""Invalid or non-existing version of a valid package"""
def __init__(self, backend, pkg_name, version):
self.backend = backend
def __init__(self, frontend, pkg_name, version):
self.frontend = frontend
self.pkg_name = pkg_name
self.version = version
def __str__(self):
return (f'Version {self.version} of package {self.pkg_name} '
f'could not be found by backend {self.backend}')
f'could not be found by frontend {self.frontend}')
class UnhandledFrontendError(Exception):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment