5#ifndef ICE_EXCEPTION_HELPERS_H
6#define ICE_EXCEPTION_HELPERS_H
8#ifdef ICE_CPP11_MAPPING
22template<
typename T,
typename B>
class LocalExceptionHelper :
public IceUtil::ExceptionHelper<T, B>
26 using IceUtil::ExceptionHelper<T, B>::ExceptionHelper;
28 virtual std::string ice_id()
const override
30 return T::ice_staticId();
38template<
typename T,
typename B>
class UserExceptionHelper :
public IceUtil::ExceptionHelper<T, B>
42 using IceUtil::ExceptionHelper<T, B>::ExceptionHelper;
44 virtual std::string ice_id()
const override
46 return T::ice_staticId();
52 virtual void _writeImpl(Ice::OutputStream* os)
const override
54 os->
startSlice(T::ice_staticId(), -1, std::is_same<B, Ice::UserException>::value ?
true :
false);
55 Ice::StreamWriter<T, Ice::OutputStream>::write(os,
static_cast<const T&
>(*
this));
60 virtual void _readImpl(Ice::InputStream* is)
override
63 Ice::StreamReader<T, ::Ice::InputStream>::read(is,
static_cast<T&
>(*
this));
Base class for all Ice run-time exceptions.
Definition Exception.h:29
void startSlice(const std::string &typeId, int compactId, bool last)
Writes the start of a value or exception slice.
Definition OutputStream.h:285
void endSlice()
Marks the end of a value or exception slice.
Definition OutputStream.h:294
Definition BuiltinSequences.h:113