1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/media/MediaException.cc
16 #include "zypp/media/MediaException.h"
20 ///////////////////////////////////////////////////////////////////
22 { /////////////////////////////////////////////////////////////////
24 /////////////////////////////////////////////////////////////////
26 std::ostream & MediaMountException::dumpOn( std::ostream & str ) const
28 return str << "Failed to mount " << _source << " on " << _target
29 << " : " << _error << endl;
32 std::ostream & MediaUnmountException::dumpOn( std::ostream & str ) const
34 return str << "Failed to unmount " << _path
35 << " : " << _error << endl;
38 std::ostream & MediaBadFilenameException::dumpOn( std::ostream & str ) const
40 return str << "Bad file name " << _filename << endl;
43 std::ostream & MediaNotOpenException::dumpOn( std::ostream & str ) const
45 return str << "Media not opened while performing action " << _action << endl;
48 std::ostream & MediaFileNotFoundException::dumpOn( std::ostream & str) const
50 return str << "File " << _filename
51 << " not found on media: " << _url << endl;
54 std::ostream & MediaWriteException::dumpOn( std::ostream & str) const
56 return str << "Cannot write file " << _filename << endl;
59 std::ostream & MediaNotAttachedException::dumpOn( std::ostream & str) const
61 return str << "Media not attached: " << _url << endl;
64 std::ostream & MediaBadAttachPointException::dumpOn( std::ostream & str) const
66 return str << "Bad media attach point: " << _url << endl;
69 std::ostream & MediaSystemException::dumpOn( std::ostream & str) const
71 return str << "System exception: " << _message
72 << " on media: " << _url << endl;
75 std::ostream & MediaNotAFileException::dumpOn( std::ostream & str) const
77 return str << "Path " << _path
78 << " on media: " << _url
79 << " is not a file." << endl;
82 std::ostream & MediaNotADirException::dumpOn( std::ostream & str) const
84 return str << "Path " << _path
85 << " on media: " << _url
86 << " is not a directory." << endl;
89 std::ostream & MediaBadUrlException::dumpOn( std::ostream & str) const
91 return str << "Malformed URL: " << _url << endl;
94 std::ostream & MediaBadUrlEmptyHostException::dumpOn( std::ostream & str) const
96 return str << "Empty host name in URL: " << _url << endl;
99 std::ostream & MediaBadUrlEmptyFilesystemException::dumpOn( std::ostream & str) const
101 return str << "Empty filesystem in URL: " << _url << endl;
104 std::ostream & MediaBadUrlEmptyDestinationException::dumpOn( std::ostream & str) const
106 return str << "Empty destination in URL: " << _url << endl;
109 std::ostream & MediaUnsupportedUrlSchemeException::dumpOn( std::ostream & str) const
111 return str << "Unsupported URL scheme in URL: " << _url << endl;
114 std::ostream & MediaNotSupportedException::dumpOn( std::ostream & str) const
116 return str << "Operation not supported by media: " << _url << endl;
120 /////////////////////////////////////////////////////////////////
123 ///////////////////////////////////////////////////////////////////