aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils/file_cmd_parser.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-10-20 03:11:50 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-10-20 03:11:50 +0300
commitf9665896e3deb6c449c764ba8b30f700abe36cd5 (patch)
tree4203b64ccf2fb8ad4d40f20edad8aeff9448ab63 /utils/file_cmd_parser.hpp
parentadd missing `assert`s (diff)
downloadaes-tools-f9665896e3deb6c449c764ba8b30f700abe36cd5.tar.gz
aes-tools-f9665896e3deb6c449c764ba8b30f700abe36cd5.zip
cxx: implement "boxes"
Diffstat (limited to 'utils/file_cmd_parser.hpp')
-rw-r--r--utils/file_cmd_parser.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/utils/file_cmd_parser.hpp b/utils/file_cmd_parser.hpp
index f20d80f..78162a6 100644
--- a/utils/file_cmd_parser.hpp
+++ b/utils/file_cmd_parser.hpp
@@ -12,6 +12,7 @@
#include <aesnixx/all.hpp>
+#include <boost/config.hpp>
#include <boost/program_options.hpp>
#include <ostream>
@@ -20,6 +21,30 @@
namespace
{
+ BOOST_NORETURN inline void throw_key_required()
+ {
+ throw boost::program_options::error(
+ "a key is required but not specified");
+ }
+
+ BOOST_NORETURN inline void throw_iv_required()
+ {
+ throw boost::program_options::error(
+ "initialization vector is required for the selected mode of operation");
+ }
+
+ BOOST_NORETURN inline void throw_src_path_required()
+ {
+ throw boost::program_options::error(
+ "please, specify source file path");
+ }
+
+ BOOST_NORETURN inline void throw_dest_path_required()
+ {
+ throw boost::program_options::error(
+ "please, specify destination file path");
+ }
+
class CommandLineParser
{
public: