Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# -*- coding: utf-8 -*-
2"""
3@file
4@brief logged exception
6By default, all exceptions are logged through the function fLOG (@see fn fLOG).
8::
10 raise PQHException ("message")
11"""
14class PQHException (Exception):
16 """
17 Define an exception.
19 - exception used in Python module to make exception
20 raised by this module easier to catch
21 - every time exception is logged
22 """
24 def __init__(self, m, log=True):
25 """constructor
26 @param m message
27 @param log log the exception
28 """
29 Exception.__init__(self, m)
30 if log:
31 from .flog import fLOG
32 fLOG("PQHException", m)