aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/exceptn.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename Integrity_Failure to Invalid_Authentication_TagJack Lloyd2019-01-181-3/+20
| | | | | | | | | This makes the meaning and usage more clear. Add a specific error type so invalid tags can be distinguished without having to catch that specific type. See also #1813
* Make exceptions easier to translate to error codesJack Lloyd2018-11-231-68/+238
| | | | | | | | | | | Avoid throwing base Botan::Exception type, as it is difficult to determine what the error is in that case. Add Exception::error_code and Exception::error_type which allows (for error code) more information about the error and (for error type) allows knowing the error type without requiring a sequence of catches. See GH #1742
* Remove support for Visual C++ 2013Jack Lloyd2018-10-011-1/+1
| | | | Closes GH #1557
* Simplify exception messagesJack Lloyd2018-08-221-1/+7
| | | | Remove "Invalid argument" and "Decoding Error" prefixes
* Add message to BOTAN_ARG_CHECK and use it more widelyJack Lloyd2018-05-131-3/+0
|
* Add a second constructor to Decoding_Error which takes an exception string.Jack Lloyd2017-11-141-0/+2
|
* Add checks that keyed algorithms are actually keyed before useJack Lloyd2017-10-261-0/+6
| | | | | Previously calling update or encrypt without calling set_key first would result in invalid outputs or else crashing.
* deprecate exceptionsDaniel Neus2017-10-211-3/+3
|
* Undeprecate these exceptionsJack Lloyd2017-10-191-5/+4
| | | | Cannot figure out how to get MSVC to shut up
* Another attempt at silencing MSVC warningJack Lloyd2017-10-191-2/+2
|
* Add a destructor to Policy_ViolationJack Lloyd2017-10-191-3/+4
| | | | | MSVC produces a deranged warning that the compiler generated destructor is deprecated, try to shut it up.
* De-inline bodies of exception classesJack Lloyd2017-10-151-67/+24
| | | | | | | | | This leads to a rather shocking decrease in binary sizes, especially the static library (~1.5 MB reduction). Saves 60KB in the shared lib. Since throwing or catching an exception is relatively expensive these not being inlined is not a problem in that sense. It had simply not occured to me that it would take up so much extra space in the binary.
* Use class instead of struct for objects with member functionsJack Lloyd2017-09-301-79/+95
| | | | Flagged by Sonar and quite reasonable
* Apply final annotations to the library alsoJack Lloyd2017-09-221-16/+16
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* Header file cleanupsJack Lloyd2017-09-211-1/+0
| | | | Some help from include-what-you-use
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-201-2/+2
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add API stability annotations.Jack Lloyd2017-09-191-22/+22
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Remove Algo_RegistryJack Lloyd2016-10-211-0/+7
| | | | | | | I repent my use of global constructors. I repent my use of global locks. Hopefully I will never touch this code again. :)
* Revert PK_Verifier change (don't require RNG there).Jack Lloyd2016-10-071-0/+10
| | | | | | | Verification is deterministic and public, so really no RNG is ever needed. Change provider handling - accepts "base", "openssl", or empty, otherwise throws a Provider_Not_Found exception.
* Cipher_Mode API improvementsJack Lloyd2016-09-011-2/+8
| | | | | | | | | | | | | | | | | | | | The Cipher_Mode::update API is more general than needed to just support ciphers (this is due to it previously being an API of Transform which before 8b85b780515 was Cipher_Mode's base class) Define a less general interface `process` which either processes the blocks in-place, producing exactly as much output as there was input, or (SIV/CCM case) saves the entire message for processing in `finish`. These two uses cover all current or anticipated cipher modes. Leaves `update` for compatability with existing callers; all that is needed is an inline function forwarding to `process`. Removes the return type from `start` - in all cipher implementations, this always returned an empty vector. Adds BOTAN_ARG_CHECK macro; right now BOTAN_ASSERT is being used for argument checking in some places, which is not right at all.
* Add Not_Implemented exceptionJack Lloyd2016-06-071-0/+10
|
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-051-17/+17
| | | | explicit.
* Avoid some Wshadows in GCC 4.8Jack Lloyd2016-02-201-7/+6
| | | | | | | | | | | | | | | In GCC 4.7 and 4.8, Wshadow also warns if a local variable conflicts with a member function. This was changed in GCC 4.9 (GCC bugzilla 57709) but causes a lot of warnings on Travis which is on 4.8. Clang's Wshadow behaves like GCC 4.9 The worst offendor was Exception's constructor argument being named `what` which conflicts with the member function of the same name, being in a public header this causes so many warnings the Travis log files are truncated. This fixes Exception and a couple of others. Fixing all cases would be a slog that I'm not up for right at the moment.
* Missing addsJack Lloyd2015-12-111-2/+2
|
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-111-11/+22
| | | | | | | | As the alternatives are unfortunate for applications trying to catch all library errors, and it seems deriving from std::runtime_error causes problems with MSVC DLLs (GH #340) Effectively reverts 2837e915d82e43
* Refactor ./botan speedSimon Warta2015-08-211-0/+10
| | | | | | | * Add random_prime benchmark * Add is_prime benchmark * Respect runtime in benchmark_transform(). This sets default runtime from 2s to 0.5s per configuration
* Add stricter time parsing; Add more testsSimon Warta2015-08-111-0/+11
|
* utils: Add missing overridesDaniel Seither2015-07-301-1/+1
|
* Refactor internal/filesystem.hSimon Warta2015-07-161-0/+8
| | | | Closes #198
* Add BOTAN_NOEXCEPT macro to work around missing noexcept in VS 2013.rcdailey2015-03-081-1/+1
| | | | Based on github pull req 23 by Robert Daily.
* Ensure all files have copyright and license info.lloyd2015-01-101-1/+1
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Move lib into srclloyd2014-01-101-0/+181