Version: 9.12.0
uiexception.UiException Class Reference

This exception should be used for functionnal error management, at least in the GUI part of the application, for example to set user oriented messages at point of exception raise. More...

Inheritance diagram for uiexception.UiException:

Public Member Functions

def __init__ (self, message, type=TYPES.USER)
 Canonical constructor. More...
 
def setUIMessage (self, UImessage)
 
def getUIMessage (self)
 
def setType (self, type)
 Specify the type of this exception. More...
 
def getType (self)
 
def __str__ (self)
 

Static Public Attributes

 TYPES
 

Private Attributes

 _UImessage
 

Static Private Attributes

string _UImessage = "An error occurs"
 
 _type = TYPES.USER
 

Detailed Description

This exception should be used for functionnal error management, at least in the GUI part of the application, for example to set user oriented messages at point of exception raise.

Warning
The exception should NOT be used to hide defaults in the algorithm, but only predicted error in the specified use case.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ __str__()

def uiexception.UiException.__str__ (   self)

◆ getType()

◆ getUIMessage()

◆ setType()

◆ setUIMessage()

def uiexception.UiException.setUIMessage (   self,
  UImessage 
)

Field Documentation

◆ _type

◆ _UImessage [1/2]

string uiexception.UiException._UImessage = "An error occurs"
staticprivate

◆ _UImessage [2/2]

uiexception.UiException._UImessage
private

◆ TYPES

uiexception.UiException.TYPES
static
Initial value:
= Enumerate([
'USER', # This type should be displayed to end user using a dialog box
'ADMIN', # This type should be displayed to admin user in console log
'DEVEL' # This type should be displayed to developer only
])

Referenced by uiexception.UiException.setType(), and KERNEL_PY.kernel.uiexception.UiException.setType().