Debian Codegraph @

src/cgelib/applications/command.md

raw
1
2 ###Testing of Application error
3 ```python3
4 >>> from command import ApplicationError
5 >>> err = ApplicationError(1, "helloworld", "", "Some error text")
6 >>> err.returncode, err.cmd, err.stdout, err.stderr
7 (1, 'helloworld', '', 'Some error text')
8 >>> print(err)
9 Non-zero return code 1 from 'helloworld', message 'Some error text'
10 >>> noterr = ApplicationError(1, "helloworld", "Some success text", "")
11 >>> noterr.returncode, noterr.cmd, noterr.stdout, noterr.stderr
12 (1, 'helloworld', 'Some success text', '')
13 >>> print(noterr)
14 Non-zero return code 1 from 'helloworld'
15
16 ```