exceptions.h File Reference

Licensed to the University Corporation for Advanced Internet Development, Inc. More...

`#include <xmltooling/base.h>`
`#include <map>`
`#include <string>`
`#include <vector>`
`#include <iostream>`
Include dependency graph for exceptions.h:
This graph shows which files directly or indirectly include this file:

## Classes

class | xmltooling::params
| Wrapper around a variable number of arguments. More...
class | xmltooling::namedparams
| Wrapper around a variable number of name/value pairs. More...
class | xmltooling::XMLToolingException
| Base exception class, supports parametrized messages and XML serialization. More...
class | xmltooling::XMLParserException
| Exceptions related to XML parsing. More...
class | xmltooling::XMLObjectException
| Exceptions in basic object usage. More...
class | xmltooling::MarshallingException
| Exceptions during object marshalling. More...
class | xmltooling::UnmarshallingException
| Exceptions during object unmarshalling. More...
class | xmltooling::UnknownElementException
| Exceptions due to processing of unknown element content. More...
class | xmltooling::UnknownAttributeException
| Exceptions due to processing of unknown attributes. More...
class | xmltooling::UnknownExtensionException
| Exceptions from use of an unrecognized extension/plugin. More...
class | xmltooling::ValidationException
| Exceptions during object validation. More...
class | xmltooling::IOException
| Exceptions related to physical input/output errors. More...
class | xmltooling::XMLSecurityException
| Exceptions related to the XML security layer. More...

## Namespaces

namespace | xmltooling
| Public namespace of XML Tooling library.

## Macros

#define | DECL_XMLTOOLING_EXCEPTION(name, linkage, ns, base, desc)
| Declares a derived exception class.
#define | DECL_XMLTOOLING_EXCEPTION_FACTORY(name, ns)
| Declares a factory function for an exception class.
#define | REGISTER_XMLTOOLING_EXCEPTION_FACTORY(name, ns)
| Registers a factory for an exception class.

## Detailed Description

Licensed to the University Corporation for Advanced Internet Development, Inc.

(UCAID) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership.

UCAID licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Exception classes.

## Macro Definition Documentation

## DECL_XMLTOOLING_EXCEPTION

#define DECL_XMLTOOLING_EXCEPTION | ( |  | name,
|  |  | linkage,
|  |  | ns,
|  |  | base,
|  |  | desc )

Value:
XMLTOOLING_DOXYGEN(desc) \
class linkage name : public base { \
public: \
XMLTOOLING_DOXYGEN(Constructor) \
name(const char* msg=nullptr, const xmltooling::params& p=xmltooling::params()) : base(msg,p) {} \
XMLTOOLING_DOXYGEN(Constructor) \
name(const char* msg, const xmltooling::namedparams& p) : base(msg,p) {} \
XMLTOOLING_DOXYGEN(Constructor) \
name(const std::string& msg, const xmltooling::params& p=xmltooling::params()) : base(msg,p) {} \
XMLTOOLING_DOXYGEN(Constructor) \
name(const std::string& msg, const xmltooling::namedparams& p) : base(msg,p) {} \
virtual ~name() throw () {} \
virtual const char* getClassName() const { return #ns"::"#name; } \
void raise() const {throw *this;} \
}
xmltooling::namedparams
Wrapper around a variable number of name/value pairs.
Definition exceptions.h:124
xmltooling::params
Wrapper around a variable number of arguments.
Definition exceptions.h:94

Declares a derived exception class.

Parameters

  name | the exception class
  linkage | linkage specification for class
  ns | the exception class C++ namespace
  base | the base class
  desc | documentation comment for class

## DECL_XMLTOOLING_EXCEPTION_FACTORY

#define DECL_XMLTOOLING_EXCEPTION_FACTORY | ( |  | name,
|  |  | ns )

Value:
xmltooling::XMLToolingException* name##Factory() \
{ \
return new ns::name(); \
}
xmltooling::XMLToolingException
Base exception class, supports parametrized messages and XML serialization.
Definition exceptions.h:145

Declares a factory function for an exception class.

Parameters

  name | the exception class name
  ns | the exception class C++ namespace

## REGISTER_XMLTOOLING_EXCEPTION_FACTORY

#define REGISTER_XMLTOOLING_EXCEPTION_FACTORY | ( |  | name,
|  |  | ns )

Value:
XMLToolingException::registerFactory(#ns"::"#name,name##Factory)

Registers a factory for an exception class.

Parameters

  name | the exception class name
  ns | the exception class C++ namespace