paludis  Version 2.6.0
args_error.hh
Go to the documentation of this file.
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2005, 2006, 2007 Ciaran McCreesh
5  *
6  * This file is part of the Paludis package manager. Paludis is free software;
7  * you can redistribute it and/or modify it under the terms of the GNU General
8  * Public License version 2, as published by the Free Software Foundation.
9  *
10  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17  * Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 
20 #ifndef PALUDIS_GUARD_ARGS_ARGS_ERROR_HH
21 #define PALUDIS_GUARD_ARGS_ARGS_ERROR_HH 1
22 
24 #include <string>
25 
26 /** \file
27  * Declarations for argument exception classes.
28  *
29  * \ingroup g_args
30  *
31  * \section Examples
32  *
33  * - None at this time.
34  */
35 
36 namespace paludis
37 {
38  namespace args
39  {
40  /**
41  * Thrown if an invalid command line argument is provided.
42  *
43  * \ingroup g_exceptions
44  * \ingroup g_args
45  */
47  public paludis::Exception
48  {
49  protected:
50  /**
51  * Constructor.
52  */
53  ArgsError(const std::string & message) noexcept;
54  };
55 
56  /**
57  * Thrown if an invalid parameter is passed to a valid command line argument.
58  *
59  * \ingroup g_args
60  * \ingroup g_exceptions
61  */
63  public ArgsError
64  {
65  public:
66  /**
67  * Constructor
68  */
69  BadValue(const std::string& option, const std::string& value) noexcept;
70  };
71 
72  /**
73  * Thrown if an argument is specified that needs a parameter,
74  * but no parameter is given.
75  *
76  * \ingroup g_args
77  * \ingroup g_exceptions
78  */
80  public ArgsError
81  {
82  public:
83  /**
84  * Constructor.
85  */
86  MissingValue(const std::string & arg) noexcept;
87  };
88  }
89 }
90 
91 #endif
Definition: about_metadata-fwd.hh:23
Definition: args_error.hh:79
Definition: exception.hh:74
Definition: args_error.hh:62
Definition: args_error.hh:46
#define PALUDIS_VISIBLE
Definition: attributes.hh:59