OTest2
A C++ testing framework
exctestmarkin.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Ondrej Starek
3  *
4  * This file is part of OTest2.
5  *
6  * OTest2 is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License,
9  * or (at your option) any later version.
10  *
11  * OTest2 is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with OTest2. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OTest2__INCLUDE_OTEST2_EXCTESTMARKIN_H_
21 #define OTest2__INCLUDE_OTEST2_EXCTESTMARKIN_H_
22 
23 #include <exception>
24 #include <string>
25 
26 #include <otest2/exc.h>
27 
28 namespace OTest2 {
29 
33 class ExcTestMarkIn : public Exception {
34  private:
35  std::string message;
36 
37  public:
43  explicit ExcTestMarkIn(
44  const std::string& message_);
45 
50  ExcTestMarkIn&& exc_) noexcept;
51 
55  virtual ~ExcTestMarkIn();
56 
57  /* -- avoid copying */
59  const ExcTestMarkIn&) = delete;
61  const ExcTestMarkIn&) = delete;
62 
63  /* -- exception interface */
64  virtual std::string reason() const override;
65 };
66 
67 } /* -- namespace OTest2 */
68 
69 #endif /* -- OTest2__INCLUDE_OTEST2_EXCTESTMARKIN_H_ */
OTest2::ExcTestMarkIn::operator=
ExcTestMarkIn & operator=(const ExcTestMarkIn &)=delete
OTest2::ExcTestMarkIn::reason
virtual std::string reason() const override
Get exception reason.
Definition: exctestmarkin.cpp:43
OTest2::ExcTestMarkIn
An exception thrown from the testmark deserializer.
Definition: exctestmarkin.h:33
OTest2::ExcTestMarkIn::ExcTestMarkIn
ExcTestMarkIn(const std::string &message_)
Ctor.
Definition: exctestmarkin.cpp:26
exc.h
OTest2
Definition: assertbean.h:25
OTest2::Exception
Generic OTest2 exception.
Definition: exc.h:31
OTest2::ExcTestMarkIn::~ExcTestMarkIn
virtual ~ExcTestMarkIn()
Dtor.
Definition: exctestmarkin.cpp:39