Skip to content

Commit

Permalink
Create Exceptions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshuDev authored Aug 3, 2024
1 parent 8922fd7 commit 0de5275
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions PheonixAppAPI/apis/Modules/Pre/PheonixExceptions/Exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
from typing import *

class PheonixException(Exception):
"""The BaseClass for all Pheonix Related Exceptions.
Args:
message (str): The message to provide upon exception.
"""
def __init__(self, message:str):
self.message = message
super().__init__(self.message)

class NotAccessFile(PheonixException):
"""The Error indicating that the file given is not an Access file.
Args:
message (str): The message to provide upon exception.
"""
pass

class InvalidType(PheonixException):
"""The Error indicating that the provided argument's type is not valid.
Args:
message (str): The message to provide upon exception.
"""
pass

class ErrorWhileCreatingFile(PheonixException):
"""The Error indicating that an issue occurred while creating the/a file.
Args:
message (str): The message to provide upon exception.
"""
pass

class ModuleDoesntExist(PheonixException):
"""The Error indicating that a module does not exist.
Args:
message (str): The message to provide upon exception.
"""
pass

class ErrorOccuredWhileInstallingModule(PheonixException):
"""The Error indicating that an issue occurred while installing a module.
Args:
message (str): The message to provide upon exception.
"""
pass

class NoInternet(PheonixException):
"""The Error indicating that there is no network connection.
Args:
message (str): The message to provide upon exception.
"""
pass

0 comments on commit 0de5275

Please sign in to comment.