MCPcopy Create free account
hub / github.com/davisking/dlib / catch

Function catch

dlib/serialize.h:2648–2679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2646 serialize_these(dlibDefaultSer$_out, __VA_ARGS__); \
2647 } \
2648 catch (dlib::serialization_error& e) \
2649 { \
2650 throw dlib::serialization_error(e.info + "\n while serializing object of type " #Type); \
2651 } \
2652 } \
2653 \
2654 void deserialize_from(std::istream& dlibDefaultSer$_in) \
2655 { \
2656 using dlib::deserialize; \
2657 using dlib::deserialize_these; \
2658 try \
2659 { \
2660 int dlibDefaultSer$_version = 0; \
2661 deserialize(dlibDefaultSer$_version, dlibDefaultSer$_in); \
2662 if (dlibDefaultSer$_version != 1) \
2663 throw dlib::serialization_error("Unexpected version found while deserializing " #Type); \
2664 deserialize_these(dlibDefaultSer$_in, __VA_ARGS__); \
2665 } \
2666 catch (dlib::serialization_error& e) \
2667 { \
2668 throw dlib::serialization_error(e.info + "\n while deserializing object of type " #Type); \
2669 } \
2670 } \
2671 inline friend void serialize(const Type& item, std::ostream& out) \
2672 { \
2673 item.serialize_to(out); \
2674 } \
2675 inline friend void deserialize(Type& item, std::istream& in) \
2676 { \
2677 item.deserialize_from(in); \
2678 }
2679}
2680
2681#endif // DLIB_SERIALIZe_
2682

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected