diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-19 03:26:02 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-19 03:26:02 +0300 |
commit | 60561b6b6cc1aee1d9a044d5c0cbf75d0312beb2 (patch) | |
tree | cb0d3bf6ea30f7ebe5091701c506168e38829a3f | |
parent | add call stacks to errors (diff) | |
download | aes-tools-60561b6b6cc1aee1d9a044d5c0cbf75d0312beb2.tar.gz aes-tools-60561b6b6cc1aee1d9a044d5c0cbf75d0312beb2.zip |
fix stderr output in executables
-rw-r--r-- | examples/aes128cbc.cpp | 5 | ||||
-rw-r--r-- | examples/aes128cfb.cpp | 5 | ||||
-rw-r--r-- | examples/aes128ctr.cpp | 5 | ||||
-rw-r--r-- | examples/aes128ecb.cpp | 5 | ||||
-rw-r--r-- | examples/aes128ofb.cpp | 5 | ||||
-rw-r--r-- | examples/aes192cbc.cpp | 5 | ||||
-rw-r--r-- | examples/aes192cfb.cpp | 5 | ||||
-rw-r--r-- | examples/aes192ctr.cpp | 5 | ||||
-rw-r--r-- | examples/aes192ecb.cpp | 5 | ||||
-rw-r--r-- | examples/aes192ofb.cpp | 5 | ||||
-rw-r--r-- | examples/aes256cbc.cpp | 5 | ||||
-rw-r--r-- | examples/aes256cfb.cpp | 5 | ||||
-rw-r--r-- | examples/aes256ctr.cpp | 5 | ||||
-rw-r--r-- | examples/aes256ecb.cpp | 5 | ||||
-rw-r--r-- | examples/aes256ofb.cpp | 5 | ||||
-rw-r--r-- | test/decrypt_block_aes.cpp | 5 | ||||
-rw-r--r-- | test/encrypt_block_aes.cpp | 5 | ||||
-rw-r--r-- | utils/aes128ecb_decrypt_file.cpp | 5 | ||||
-rw-r--r-- | utils/aes128ecb_encrypt_file.cpp | 5 |
19 files changed, 95 insertions, 0 deletions
diff --git a/examples/aes128cbc.cpp b/examples/aes128cbc.cpp index 09f13cd..cf61604 100644 --- a/examples/aes128cbc.cpp +++ b/examples/aes128cbc.cpp @@ -47,6 +47,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes128cfb.cpp b/examples/aes128cfb.cpp index a8bbb03..c8f7230 100644 --- a/examples/aes128cfb.cpp +++ b/examples/aes128cfb.cpp @@ -43,6 +43,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes128ctr.cpp b/examples/aes128ctr.cpp index ebd8793..5419ce2 100644 --- a/examples/aes128ctr.cpp +++ b/examples/aes128ctr.cpp @@ -43,6 +43,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes128ecb.cpp b/examples/aes128ecb.cpp index c716c70..d999f81 100644 --- a/examples/aes128ecb.cpp +++ b/examples/aes128ecb.cpp @@ -41,6 +41,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes128ofb.cpp b/examples/aes128ofb.cpp index 32d67d5..f5f93d0 100644 --- a/examples/aes128ofb.cpp +++ b/examples/aes128ofb.cpp @@ -43,6 +43,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes192cbc.cpp b/examples/aes192cbc.cpp index 8eaffa8..b2adabd 100644 --- a/examples/aes192cbc.cpp +++ b/examples/aes192cbc.cpp @@ -47,6 +47,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes192cfb.cpp b/examples/aes192cfb.cpp index b84700e..d7fd9b5 100644 --- a/examples/aes192cfb.cpp +++ b/examples/aes192cfb.cpp @@ -43,6 +43,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes192ctr.cpp b/examples/aes192ctr.cpp index d53cb38..9cad355 100644 --- a/examples/aes192ctr.cpp +++ b/examples/aes192ctr.cpp @@ -41,6 +41,11 @@ int main() dump_decrypted(decrypted); dump_next_iv(next_iv); } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes192ecb.cpp b/examples/aes192ecb.cpp index 7a7cb92..313f084 100644 --- a/examples/aes192ecb.cpp +++ b/examples/aes192ecb.cpp @@ -41,6 +41,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes192ofb.cpp b/examples/aes192ofb.cpp index c0fc88e..e2d96c4 100644 --- a/examples/aes192ofb.cpp +++ b/examples/aes192ofb.cpp @@ -43,6 +43,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes256cbc.cpp b/examples/aes256cbc.cpp index 8ce14c2..c5ab427 100644 --- a/examples/aes256cbc.cpp +++ b/examples/aes256cbc.cpp @@ -47,6 +47,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes256cfb.cpp b/examples/aes256cfb.cpp index 599392c..fb43d3a 100644 --- a/examples/aes256cfb.cpp +++ b/examples/aes256cfb.cpp @@ -43,6 +43,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes256ctr.cpp b/examples/aes256ctr.cpp index 1431992..9827e79 100644 --- a/examples/aes256ctr.cpp +++ b/examples/aes256ctr.cpp @@ -41,6 +41,11 @@ int main() dump_decrypted(decrypted); dump_next_iv(next_iv); } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes256ecb.cpp b/examples/aes256ecb.cpp index 49e03bf..e8777e2 100644 --- a/examples/aes256ecb.cpp +++ b/examples/aes256ecb.cpp @@ -41,6 +41,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/examples/aes256ofb.cpp b/examples/aes256ofb.cpp index 3bc7268..1d806aa 100644 --- a/examples/aes256ofb.cpp +++ b/examples/aes256ofb.cpp @@ -43,6 +43,11 @@ int main() return 0; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/test/decrypt_block_aes.cpp b/test/decrypt_block_aes.cpp index ff2d494..3bb8e44 100644 --- a/test/decrypt_block_aes.cpp +++ b/test/decrypt_block_aes.cpp @@ -109,6 +109,11 @@ int main(int argc, char** argv) std::cerr << "Usage error: " << e.what() << "\n"; return 1; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/test/encrypt_block_aes.cpp b/test/encrypt_block_aes.cpp index fc56019..6de9288 100644 --- a/test/encrypt_block_aes.cpp +++ b/test/encrypt_block_aes.cpp @@ -109,6 +109,11 @@ int main(int argc, char** argv) std::cerr << "Usage error: " << e.what() << "\n"; return 1; } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/utils/aes128ecb_decrypt_file.cpp b/utils/aes128ecb_decrypt_file.cpp index ab55304..9b8b15c 100644 --- a/utils/aes128ecb_decrypt_file.cpp +++ b/utils/aes128ecb_decrypt_file.cpp @@ -89,6 +89,11 @@ int main(int argc, char** argv) dest_ofs.open(dest_path, std::ofstream::binary); dest_ofs.write(dest_buf.data(), dest_size); } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; diff --git a/utils/aes128ecb_encrypt_file.cpp b/utils/aes128ecb_encrypt_file.cpp index d197ec6..a43c4d9 100644 --- a/utils/aes128ecb_encrypt_file.cpp +++ b/utils/aes128ecb_encrypt_file.cpp @@ -88,6 +88,11 @@ int main(int argc, char** argv) dest_ofs.open(dest_path, std::ofstream::binary); dest_ofs.write(dest_buf.data(), dest_size); } + catch (const aesni::Error& e) + { + std::cerr << e; + return 1; + } catch (const std::exception& e) { std::cerr << e.what() << "\n"; |