mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
19 lines
551 B
Python
19 lines
551 B
Python
class RomFileOwnerChangedError(Exception):
|
|
def __init__(self, rom_file_id: int) -> None:
|
|
self.message = (
|
|
f"Rom file {rom_file_id} moved to another rom while it was being locked"
|
|
)
|
|
super().__init__(self.message)
|
|
|
|
def __repr__(self) -> str:
|
|
return self.message
|
|
|
|
|
|
class LastAdminError(Exception):
|
|
def __init__(self, user_id: int) -> None:
|
|
self.message = f"User {user_id} is the last admin"
|
|
super().__init__(self.message)
|
|
|
|
def __repr__(self) -> str:
|
|
return self.message
|