Convenience class Error reporting.
More...
#include <zypp-tui/output/Out.h>
Convenience class Error reporting.
Called action methods may throw
this as exception. The calling function should catch and process it (e.g. by calling report).
This allows e.g. active Out::ProgressBar objects to close properly before the error message is displayed.
try {
Out::ProgressBar
report( zypper_r.out(),
_(
"Scanning download directory") );
report->range( todolist.size() );
....
_(
"Failed to read download directory"),
}
{
return error_r.report( zypper_r );
}
Definition at line 1151 of file Out.h.
◆ Error() [1/4]
ztui::Out::Error::Error |
( |
int |
exitcode_r | ) |
|
|
inline |
◆ Error() [2/4]
ztui::Out::Error::Error |
( |
int |
exitcode_r, |
|
|
std::string |
msg_r, |
|
|
std::string |
hint_r = std::string() |
|
) |
| |
|
inline |
◆ Error() [3/4]
ztui::Out::Error::Error |
( |
int |
exitcode_r, |
|
|
const zypp::Exception & |
ex_r, |
|
|
std::string |
hint_r = std::string() |
|
) |
| |
|
inline |
◆ Error() [4/4]
ztui::Out::Error::Error |
( |
int |
exitcode_r, |
|
|
std::string |
msg_r, |
|
|
const zypp::Exception & |
ex_r, |
|
|
std::string |
hint_r = std::string() |
|
) |
| |
|
inline |
◆ report()
int ztui::Out::Error::report |
( |
Application & |
app_r | ) |
const |
Default way of processing a caught Error exception.
- Write error message and optional hint to screen.
- Set the ZYPPER_EXIT_ code if necessary.
- Returns
- the zypper exitcode.
Definition at line 144 of file Out.cc.
◆ combine() [1/2]
std::string ztui::Out::Error::combine |
( |
std::string && |
msg_r, |
|
|
const zypp::Exception & |
ex_r |
|
) |
| |
|
staticprivate |
◆ combine() [2/2]
◆ _exitcode
int ztui::Out::Error::_exitcode |
◆ _msg
std::string ztui::Out::Error::_msg |
◆ _hint
std::string ztui::Out::Error::_hint |
The documentation for this class was generated from the following files: