From 2bac8d9689081faf9ccd01264f6cb5702a3b180b Mon Sep 17 00:00:00 2001 From: 苏向夜 Date: Fri, 8 Mar 2024 13:40:36 +0800 Subject: fix(exceptions): update exceptions --- src/ipm/exceptions.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/ipm/exceptions.py b/src/ipm/exceptions.py index 3629363..f7c540f 100644 --- a/src/ipm/exceptions.py +++ b/src/ipm/exceptions.py @@ -1,11 +1,15 @@ -class IpmException(Exception): +class IPMException(Exception): """IPM Base Exception""" -class FileException(IpmException): +class FileException(IPMException): """IPM File Base Exception""" +class ProjectError(FileException): + """Exceptions on `infini.toml` project file""" + + class TomlLoadFailed(FileException): """Failed to load `infini.toml`""" @@ -22,21 +26,21 @@ class FileExistsError(FileException, FileExistsError): """Raises when file not founded""" -class SyntaxError(IpmException, SyntaxError): +class SyntaxError(IPMException, SyntaxError): """Syntax Error in config file""" -class HashException(IpmException): +class HashException(IPMException): """Exception occured in hashing""" -class VerifyFailed(IpmException): +class VerifyFailed(IPMException): """Failed to verify ipk file""" -class FileTypeMismatch(IpmException): +class FileTypeMismatch(IPMException): """Ipk file type mismatch""" -class PackageExsitsError(IpmException): +class PackageExsitsError(IPMException): """Package already installed""" -- cgit v1.2.3-70-g09d2