Ice 3.7 C++11 API Reference
Loading...
Searching...
No Matches
Exception.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4
5#ifndef ICE_EXCEPTION_H
6#define ICE_EXCEPTION_H
7
8#include <IceUtil/Exception.h>
9#include <Ice/Config.h>
10#include <Ice/Format.h>
11#include <Ice/Handle.h>
12#include <Ice/ObjectF.h>
13#include <Ice/ValueF.h>
14#include <Ice/SlicedDataF.h>
15
16namespace Ice
17{
18
19class OutputStream;
20class InputStream;
21
23
29{
30public:
31
37 LocalException(const char* file, int line);
38
39#ifdef ICE_CPP11_COMPILER
40 LocalException(const LocalException&) = default;
41 virtual ~LocalException();
42#else
43 virtual ~LocalException() throw();
44#endif
45
50#ifdef ICE_CPP11_MAPPING
51 std::unique_ptr<LocalException> ice_clone() const;
52#else
53 virtual LocalException* ice_clone() const = 0;
54#endif
55
60 static const std::string& ice_staticId();
61};
62
68{
69public:
70
75#ifdef ICE_CPP11_MAPPING
76 std::unique_ptr<UserException> ice_clone() const;
77#else
78 virtual UserException* ice_clone() const = 0;
79#endif
80 virtual Ice::SlicedDataPtr ice_getSlicedData() const;
81
86 static const std::string& ice_staticId();
87
89 virtual void _write(::Ice::OutputStream*) const;
90 virtual void _read(::Ice::InputStream*);
91
92 virtual bool _usesClasses() const;
94
95protected:
96
98 virtual void _writeImpl(::Ice::OutputStream*) const {}
99 virtual void _readImpl(::Ice::InputStream*) {}
101};
102
111{
112public:
113
119 SystemException(const char* file, int line);
120
121#ifdef ICE_CPP11_COMPILER
122 SystemException(const SystemException&) = default;
123 virtual ~SystemException();
124#else
125 virtual ~SystemException() throw();
126#endif
127
132#ifdef ICE_CPP11_MAPPING
133 std::unique_ptr<SystemException> ice_clone() const;
134#else
135 virtual SystemException* ice_clone() const = 0;
136#endif
137
142 static const std::string& ice_staticId();
143};
144
145}
146
147namespace IceInternal
148{
149
150namespace Ex
151{
152
153ICE_API void throwUOE(const ::std::string&, const ::Ice::ValuePtr&);
154ICE_API void throwMemoryLimitException(const char*, int, size_t, size_t);
155ICE_API void throwMarshalException(const char*, int, const std::string&);
156
157}
158
159}
160
161#endif
#define ICE_API
Definition Config.h:197
Abstract base class for all Ice exceptions.
Definition Exception.h:22
Interface for input streams used to extract Slice types from a sequence of bytes.
Definition InputStream.h:50
static const std::string & ice_staticId()
Obtains the Slice type ID of this exception.
LocalException(const char *file, int line)
The file and line number are required for all local exceptions.
virtual ~LocalException()
std::unique_ptr< LocalException > ice_clone() const
Polymorphically clones this exception.
Interface for output streams used to create a sequence of bytes from Slice types.
Definition OutputStream.h:28
std::unique_ptr< SystemException > ice_clone() const
Polymorphically clones this exception.
SystemException(const char *file, int line)
The file and line number are required for all local exceptions.
static const std::string & ice_staticId()
Obtains the Slice type ID of this exception.
virtual ~SystemException()
Base class for all Ice user exceptions.
Definition Exception.h:68
virtual Ice::SlicedDataPtr ice_getSlicedData() const
static const std::string & ice_staticId()
Obtains the Slice type ID of this exception.
std::unique_ptr< UserException > ice_clone() const
Polymorphically clones this exception.
Definition BuiltinSequences.h:56
IceUtil::Exception Exception
Definition Exception.h:22