Update README.md
[nemesis.git] / Platform / Exception.cpp
1 /*
2  Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
3
4  Governed by the TrueCrypt License 3.0 the full text of which is contained in
5  the file License.txt included in TrueCrypt binary and source code distribution
6  packages.
7 */
8
9 #include "Exception.h"
10 #include "SerializerFactory.h"
11
12 namespace TrueCrypt
13 {
14         void Exception::Deserialize (shared_ptr <Stream> stream)
15         {
16                 Serializer sr (stream);
17                 sr.Deserialize ("Message", Message);
18                 sr.Deserialize ("Subject", Subject);
19         }
20
21         void Exception::Serialize (shared_ptr <Stream> stream) const
22         {
23                 Serializable::Serialize (stream);
24                 Serializer sr (stream);
25                 sr.Serialize ("Message", Message);
26                 sr.Serialize ("Subject", Subject);
27         }
28
29         void ExecutedProcessFailed::Deserialize (shared_ptr <Stream> stream)
30         {
31                 Exception::Deserialize (stream);
32                 Serializer sr (stream);
33                 sr.Deserialize ("Command", Command);
34                 sr.Deserialize ("ExitCode", ExitCode);
35                 sr.Deserialize ("ErrorOutput", ErrorOutput);
36         }
37
38         void ExecutedProcessFailed::Serialize (shared_ptr <Stream> stream) const
39         {
40                 Exception::Serialize (stream);
41                 Serializer sr (stream);
42                 sr.Serialize ("Command", Command);
43                 sr.Serialize ("ExitCode", ExitCode);
44                 sr.Serialize ("ErrorOutput", ErrorOutput);
45         }
46
47 #define TC_EXCEPTION(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE)
48 #undef TC_EXCEPTION_NODECL
49 #define TC_EXCEPTION_NODECL(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE)
50
51         TC_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (Exception);
52 }
This page took 0.020314 seconds and 3 git commands to generate. Download a nemesis OSX (sierra+high sierra, tested/working) binary, with fuse-ext3 via e2fsprogs, at this link. application and installer are signed by screwjack, llc. must install fuse with macFUSE layer first.