changeset 2495:537a4a8075f8

core (exceptions): added ClientTypeError to deal when a code should not be executed by a client or component profile.
author Goffi <goffi@goffi.org>
date Wed, 28 Feb 2018 18:28:39 +0100
parents d1df08c79a5d
children 769e8d9d2438
files src/core/exceptions.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/exceptions.py	Wed Feb 28 18:28:39 2018 +0100
+++ b/src/core/exceptions.py	Wed Feb 28 18:28:39 2018 +0100
@@ -27,15 +27,11 @@
 
 
 class ProfileNotSetError(Exception):
-    """
-    This error raises when no profile has been set (value @NONE@ is found, but it should have been replaced)
-    """
-    pass
+    """This error raises when no profile has been set (value @NONE@ is found, but it should have been replaced)"""
 
 
 class ProfileConnected(Exception):
     """This error is raised when trying to delete a connected profile."""
-    pass
 
 
 class ProfileNotConnected(Exception):
@@ -46,6 +42,10 @@
     pass
 
 
+class ClientTypeError(Exception):
+    """This code is not allowed for this type of client (i.e. component or not)"""
+
+
 class UnknownEntityError(Exception):
     pass