• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

randombit / botan / 5696981105

28 Jul 2023 12:55PM UTC coverage: 91.69% (+0.005%) from 91.685%
5696981105

push

github

randombit
Merge GH #3649 Remove some macros from loadstor.h

78267 of 85360 relevant lines covered (91.69%)

12322548.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/src/lib/tls/tls_exceptn.h
1
/*
2
* Exceptions
3
* (C) 2004-2006 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7

8
#ifndef BOTAN_TLS_EXCEPTION_H_
9
#define BOTAN_TLS_EXCEPTION_H_
10

11
#include <botan/exceptn.h>
12
#include <botan/tls_alert.h>
13

14
namespace Botan::TLS {
15

16
/**
17
* TLS Exception Base Class
18
*/
19
class BOTAN_PUBLIC_API(2, 0) TLS_Exception : public Exception {
6✔
20
   public:
21
      Alert::Type type() const { return m_alert_type; }
3,557✔
22

23
      TLS_Exception(Alert::Type type, std::string_view err_msg = "Unknown error") :
3,923✔
24
            Exception(err_msg), m_alert_type(type) {}
3,884✔
25

26
      int error_code() const noexcept override { return static_cast<int>(m_alert_type); }
×
27

28
      ErrorType error_type() const noexcept override { return ErrorType::TLSError; }
×
29

30
   private:
31
      Alert::Type m_alert_type;
32
};
33

34
/**
35
* Unexpected_Message Exception
36
*/
37
class BOTAN_PUBLIC_API(2, 0) Unexpected_Message final : public TLS_Exception {
38
   public:
39
      explicit Unexpected_Message(std::string_view err) : TLS_Exception(AlertType::UnexpectedMessage, err) {}
51✔
40
};
41

42
}  // namespace Botan::TLS
43

44
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc