Convenience class Error reporting.
More...
#include <zypp-tui/output/Out.h>
|
| Error (int exitcode_r) |
| Error (int exitcode_r, std::string msg_r, std::string hint_r=std::string()) |
| Error (int exitcode_r, const zypp::Exception &ex_r, std::string hint_r=std::string()) |
| Error (int exitcode_r, std::string msg_r, const zypp::Exception &ex_r, std::string hint_r=std::string()) |
int | report (Application &app_r) const |
| Default way of processing a caught Error exception.
|
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 {
report->range( todolist.size() );
....
_(
"Failed to read download directory"),
}
catch ( const SourceDownloadImpl::Error & error_r )
{
return error_r.report( zypper_r );
}
Convenience class for progress output.
virtual void error(const std::string &problem_desc, const std::string &hint="")=0
Show an error message and an optional hint.
Convenience errno wrapper.
std::string asString(const Patch::Category &obj)
Convenience class Error reporting.
int report(Application &app_r) const
Default way of processing a caught Error exception.
Definition at line 1145 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 155 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: