Poco::Netconf

class NetconfException

Library: Netconf
Package: Netconf
Header: Poco/Netconf/NetconfException.h

Inheritance

Direct Base Classes: Poco::RuntimeException

All Base Classes: Poco::Exception, Poco::RuntimeException, std::exception

Member Summary

Member Functions: addBadAttributeErrorInfo, addElementErrorInfo, addPartialOperationErrorInfo, addSessionIdErrorInfo, addUnknownNameSpaceErrorInfo, className, clone, errorType, getErrorInfos, name, operator =, tag

Inherited Functions: className, clone, code, displayText, message, name, nested, operator =, rethrow, what

Types

ComplexErrorInfo

typedef std::multimap < ErrorInfo, std::string > ComplexErrorInfo;

ErrorInfos

typedef std::vector < ComplexErrorInfo > ErrorInfos;

OperationErrorInfo

typedef std::vector < std::string > OperationErrorInfo;

Enumerations

ErrorInfo

OK_ELEMENT = 0

ERR_ELEMENT = 1

NOOP_ELEMENT = 2

SESSION_ID = 3

EBAD_ATTRIBUTE = 4

EBAD_ELEMENT = 5

EBAD_NAMESPACE = 6

ErrorType

TRANSPORT = 0

RPC = 1

PROTOCOL = 2

APPLICATION = 3

Tag

IN_USE = 0

INVALID_VALUE = 1

TOO_BIG = 2

MISSING_ATTRIBUTE = 3

BAD_ATTRIBUTE = 4

UNKNOWN_ATTRIBUTE = 5

MISSING_ELEMENT = 6

BAD_ELEMENT = 7

UNKNOWN_ELEMENT = 8

UNKNOWN_NAMESPACE = 9

ACCESS_DENIED = 10

LOCK_DENIED = 11

RESOURCE_DENIED = 12

ROLLBACK_FAILED = 13

DATA_EXISTS = 14

DATA_MISSING = 15

OPERATION_NOT_SUPPORTED = 16

OPERATION_FAILED = 17

PARTIAL_OPERATION = 18

Constructors

NetconfException

NetconfException(
    const NetconfException & exc
);

NetconfException

NetconfException(
    Tag tag,
    ErrorType type
);

NetconfException

NetconfException(
    Tag tag,
    ErrorType type,
    const std::string & msg
);

NetconfException

NetconfException(
    Tag tag,
    ErrorType type,
    const std::string & msg,
    const std::string & arg
);

NetconfException

NetconfException(
    Tag tag,
    ErrorType type,
    const std::string & msg,
    const Poco::Exception & exc
);

Destructor

~NetconfException

~NetconfException();

Member Functions

addBadAttributeErrorInfo

void addBadAttributeErrorInfo(
    const std::string & badAttrName,
    const std::string & badElemOwner
);

Adds a bad attribute error info. Tag must be a member of {MISSING_ATTRIBUTE, BAD_ATTRIBUTE, UNKNOWN_ATTRIBUTE}

addElementErrorInfo

void addElementErrorInfo(
    const std::string & msg
);

Adds a bad element error info. Tag must be a member of {MISSING_ELEMENT, BAD_ELEMENT, UNKNOWN_ELEMENT}

addPartialOperationErrorInfo

void addPartialOperationErrorInfo(
    const OperationErrorInfo & okElems,
    const OperationErrorInfo & errElems,
    const OperationErrorInfo & noopElems
);

Adds error info for an partial operation tag. Will throw if tag != PARTIAL_OPERATION.

addSessionIdErrorInfo

void addSessionIdErrorInfo(
    Poco::UInt32 sessionId
);

Adds error info for a sessionid error, tag must be LOCK_DENIED.

addUnknownNameSpaceErrorInfo

void addUnknownNameSpaceErrorInfo(
    const std::string & badElem,
    const std::string & badNamespace
);

Adds error info for an unknown namespace tag. Will throw if tag != UNKNOWN_NAMESPACE.

className virtual

const char * className() const;

See also: Poco::RuntimeException::className()

clone

Poco::Exception * clone() const;

errorType inline

NetconfException::ErrorType errorType() const;

Returns the error type.

getErrorInfos inline

const ErrorInfos & getErrorInfos() const;

Returns additional error information.

name virtual

const char * name() const;

See also: Poco::RuntimeException::name()

operator =

NetconfException & operator = (
    const NetconfException & exc
);

tag inline

NetconfException::Tag tag() const;

Returns the tag of the exception

Variables

_errorType protected

NetconfException::ErrorType _errorType;

_errs protected

ErrorInfos _errs;

_tag protected

NetconfException::Tag _tag;