"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "Exception.cpp" see the
Fossies "Dox" file reference documentation.
1 /*
2 Derived from source code of TrueCrypt 7.1a, which is
3 Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
4 by the TrueCrypt License 3.0.
5
6 Modifications and additions to the original source code (contained in this file)
7 and all other portions of this file are Copyright (c) 2013-2017 IDRIX
8 and are governed by the Apache License 2.0 the full text of which is
9 contained in the file License.txt included in VeraCrypt binary and source
10 code distribution packages.
11 */
12
13 #include "Exception.h"
14 #include "SerializerFactory.h"
15
16 namespace VeraCrypt
17 {
18 void Exception::Deserialize (shared_ptr <Stream> stream)
19 {
20 Serializer sr (stream);
21 sr.Deserialize ("Message", Message);
22 sr.Deserialize ("Subject", Subject);
23 }
24
25 void Exception::Serialize (shared_ptr <Stream> stream) const
26 {
27 Serializable::Serialize (stream);
28 Serializer sr (stream);
29 sr.Serialize ("Message", Message);
30 sr.Serialize ("Subject", Subject);
31 }
32
33 void ExecutedProcessFailed::Deserialize (shared_ptr <Stream> stream)
34 {
35 Exception::Deserialize (stream);
36 Serializer sr (stream);
37 sr.Deserialize ("Command", Command);
38 sr.Deserialize ("ExitCode", ExitCode);
39 sr.Deserialize ("ErrorOutput", ErrorOutput);
40 }
41
42 void ExecutedProcessFailed::Serialize (shared_ptr <Stream> stream) const
43 {
44 Exception::Serialize (stream);
45 Serializer sr (stream);
46 sr.Serialize ("Command", Command);
47 sr.Serialize ("ExitCode", ExitCode);
48 sr.Serialize ("ErrorOutput", ErrorOutput);
49 }
50
51 #define TC_EXCEPTION(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE)
52 #undef TC_EXCEPTION_NODECL
53 #define TC_EXCEPTION_NODECL(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE)
54
55 TC_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (Exception);
56 }