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 /utils | |
parent | add call stacks to errors (diff) | |
download | aes-tools-60561b6b6cc1aee1d9a044d5c0cbf75d0312beb2.tar.gz aes-tools-60561b6b6cc1aee1d9a044d5c0cbf75d0312beb2.zip |
fix stderr output in executables
Diffstat (limited to '')
-rw-r--r-- | utils/aes128ecb_decrypt_file.cpp | 5 | ||||
-rw-r--r-- | utils/aes128ecb_encrypt_file.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
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"; |