libzypp  13.10.6
TargetException.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_TARGET_TARGETEXCEPTION_H
13 #define ZYPP_TARGET_TARGETEXCEPTION_H
14 
15 #include <iosfwd>
16 
17 #include <string>
18 
19 #include "zypp/base/Exception.h"
20 #include "zypp/Pathname.h"
21 
23 namespace zypp
24 {
25  namespace target {
27  //
28  // CLASS NAME : TargetException
32  class TargetException : public Exception
33  {
34  public:
39  : Exception( "Target Exception" )
40  {}
44  TargetException( const std::string & msg_r )
45  : Exception( msg_r )
46  {}
48  virtual ~TargetException() throw() {};
49  };
50 
52  {
53  public:
57  TargetAbortedException( const std::string & msg_r )
58  : TargetException( msg_r )
59  {}
61  virtual ~TargetAbortedException() throw() {};
62  protected:
63  virtual std::ostream & dumpOn( std::ostream & str ) const;
64  private:
65  };
66 
67 
69  } // namespace target
70 } // namespace zypp
72 #endif // ZYPP_TARGET_TARGETEXCEPTION_H
TargetException(const std::string &msg_r)
Ctor taking message.
virtual std::ostream & dumpOn(std::ostream &str) const
Overload this to print a proper error message.
TargetException()
Ctor taking message.
Base class for Exception.
Definition: Exception.h:143
TargetAbortedException(const std::string &msg_r)
Ctor taking message.
Just inherits Exception to separate target exceptions.