summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2024-01-17 22:07:00 +0800
committer苏向夜 <fu050409@163.com>2024-01-17 22:07:00 +0800
commit0fae9e4227b9557f0c159892ae0c9bb383aba651 (patch)
tree1324e7891b81d4e56502f6e239ed1eacb6e78e41
parent959885e4c13fdd447733046d06916d9061dad402 (diff)
downloadipm-0fae9e4227b9557f0c159892ae0c9bb383aba651.tar.gz
ipm-0fae9e4227b9557f0c159892ae0c9bb383aba651.zip
:sparkles: feat(exception): improve exceptions defination
-rw-r--r--src/ipm/exceptions.py12
1 files changed, 10 insertions, 2 deletions
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"""