15#include <zypp-core/base/String.h>
16#include <zypp-core/base/Gettext.h>
18#include <zypp-media/MediaException>
43 return str << form(
_(
"Failed to unmount %s"),
_path.c_str() ) <<
" : " <<
_error;
48 return str << form(
_(
"Bad file name: %s"),
_filename.c_str() );
53 return str << form(
_(
"Medium not opened when trying to perform action '%s'."),
_action.c_str() );
58 return str << form(
_(
"File '%s' not found on medium '%s'"),
_filename.c_str(),
_url.c_str() );
63 return str << form(
_(
"Cannot write file '%s'."),
_filename.c_str() );
68 return str <<
_(
"Medium not attached") <<
": " <<
_url;
73 return str <<
_(
"Bad media attach point") <<
": " <<
_url;
79 return str << form(
_(
"Download (curl) initialization failed for '%s'"),
_url.c_str() );
84 return str << form(
_(
"System exception '%s' on medium '%s'."),
_message.c_str(),
_url.c_str() );
89 return str << form(
_(
"Path '%s' on medium '%s' is not a file."),
_path.c_str(),
_url.c_str() );
94 return str << form(
_(
"Path '%s' on medium '%s' is not a directory."),
_path.c_str(),
_url.c_str() );
101 return str <<
_(
"Malformed URI") <<
": " <<
_url;
111 return str <<
_(
"Empty host name in URI") <<
": " <<
_url;
116 return str <<
_(
"Empty filesystem in URI") <<
": " <<
_url;
121 return str <<
_(
"Empty destination in URI") <<
": " <<
_url;
126 return str << form(
_(
"Unsupported URI scheme in '%s'."),
_url.c_str() );
131 return str <<
_(
"Operation not supported by medium") <<
": " <<
_url;
137 return str << form(
_(
138 "Download (curl) error for '%s':\n"
140 "Error message: %s\n"),
_url.c_str(),
_err.c_str(),
_msg.c_str());
146 return str << form(
_(
"Error occurred while setting download (curl) options for '%s':"),
_url.c_str() );
153 return str << form(
_(
"Media source '%s' does not contain the desired medium"),
_url.c_str() );
158 return str << form(
_(
"Medium '%s' is in use by another instance"),
_name.c_str() );
164 return str <<
_(
"Cannot eject any media");
166 return str << form(
_(
"Cannot eject media '%s'"),
_name.c_str());
181 str << form(
_(
"Permission to access '%s' denied."),
_url.c_str());
189 str << form(
_(
"Timeout exceeded when accessing '%s'."),
_url.c_str() );
205 str << form(
_(
"Location '%s' is temporarily unaccessible."),
_url.c_str() );
213 str << form(
_(
" SSL certificate problem, verify that the CA cert is OK for '%s'."),
_url.c_str() );
220 str <<
_(
"No free ressources available to attach medium.");
std::string asString(unsigned field_width_r=0, unsigned unit_width_r=1) const
Auto selected Unit and precision.
const std::string & msg() const
Return the message string provided to the ctor.
std::string asString() const
Returns a default string representation of the Url object.
String related utilities and Regular expression matching.
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Easy-to use interface to the ZYPP dependency resolver.