Skip to content

Commit 2c2150c

Browse files
authored
Documentation: Exception handling added
1 parent 0825cdf commit 2c2150c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

DOKU.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
The execution of elements is logged in a file that changes daily.
2121
The log files are archived under `~/Pythonic/log (Linux)` or `%HOMEPATH%\Pythonic\log` (Windows).
22-
Pythonic's web service provides an overview of available log files at **http://<address-info>:7000/log**.
22+
Pythonic's web service provides an overview of available log files at **http://\<address-info>:7000/log**. Single log files can be accessed witch the following scheme: **http://\<address-info>:7000/\<year>_\<month>_\<day>.txt**.
2323

2424
- INFO
2525
- Ordinary debug trace messages
@@ -30,14 +30,18 @@ Pythonic's web service provides an overview of available log files at **http://<
3030
- Can be switched on or off by the user (checkbox in element configuration)
3131
- A log entry of this type is created when the element returns data of type PythonicError
3232
- Implementation in own code is optional
33-
- Critical (Unhandled exception):
34-
- Is signalized in the GUI an (,,Exception occured, open log for details)
35-
- Log entry (type ERROR) is made
33+
- ERROR (Unhandled exception):
34+
- Caused by an unhandles exception
35+
- Is signalized in the GUI ("Exception occured, open log for details")
3636
- Is always active (implementation not optional)
3737

3838
### Exception handling
3939

40-
40+
1. Elements should throw an exception when configuration data is missing or cannot be processed.
41+
2. Elements should try to handle all possible exceptions internally and only throw critical exceptions.
42+
3. The result of a operation (if successfull or not (see #2)) should always be forwarded to subsequent elements in order to react to a possible failed call. If the result of a failed call could be processed by an subsequent element, it should be wrapped in the `PythonicError` type.
43+
4. In case of a failed call, a meaningful message or the exception text should returned (`PythonicError` as data parameter in returned `Record` type)
44+
5. Don't to use `logging.error` or `logging.warning` as it has no effect if used in combination with multiprocessing.
4145

4246
## Elements
4347

0 commit comments

Comments
 (0)