From 0fae9e4227b9557f0c159892ae0c9bb383aba651 Mon Sep 17 00:00:00 2001 From: 苏向夜 Date: Wed, 17 Jan 2024 22:07:00 +0800 Subject: :sparkles: feat(exception): improve exceptions defination --- src/ipm/exceptions.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ipm/exceptions.py b/src/ipm/exceptions.py index e6a01c0..b19b60c 100644 --- a/src/ipm/exceptions.py +++ b/src/ipm/exceptions.py @@ -2,11 +2,19 @@ class IpmException(Exception): """IPM Base Exception""" -class FileNotFoundError(IpmException, FileNotFoundError): +class FileException(IpmException): + """IPM File Base Exception""" + + +class TomlLoadFailed(FileException): + """Failed to load `infini.toml`""" + + +class FileNotFoundError(FileException, FileNotFoundError): """Raises when file not founded""" -class FileExistsError(IpmException, FileExistsError): +class FileExistsError(FileException, FileExistsError): """Raises when file not founded""" -- cgit v1.2.3-70-g09d2