Yoba Perl
All Classes Functions Typedefs Friends
perl_exception.hpp
1 #ifndef YOBAPERL_EXCEPTION_HPP
2 #define YOBAPERL_EXCEPTION_HPP
3 
4 #include "yobaperl/common.hpp"
5 #include "array.hpp"
6 
7 #include <exception>
8 
9 namespace yoba {
10 
11 
12 
17 class YOBAPERL_EXPORT PerlException : public std::exception
18 {
19  friend class Perl;
20 
21 public:
22  PerlException(int perl_id, std::string info, std::string eval_sting = "");
23 
24 
25 
30  const std::string & getInfo() const;
31 
36  bool isEval() const;
37 
42  const std::string & getEvalString() const;
43 
48  int getPerlId() const;
49 
50 
51 
52  const char * what() const noexcept;
53 
54 private:
55  int _perl_id;
56  std::string _eval_string;
57  std::string _info;
58 };
59 
60 
61 
62 } // namespace yoba
63 
64 #endif // YOBAPERL_EXCEPTION_HPP
Definition: array.cpp:5
Main class.
Definition: perl.hpp:32
Perl exception.