Skip to content
Snippets Groups Projects
Commit fb977991 authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Update docs.

parent d942f104
No related merge requests found
...@@ -548,8 +548,6 @@ all :class:`~.schemanode.TerminalNode` instances. ...@@ -548,8 +548,6 @@ all :class:`~.schemanode.TerminalNode` instances.
>>> type(union_t.types[0]) >>> type(union_t.types[0])
<class 'yangson.datatype.StringType'> <class 'yangson.datatype.StringType'>
.. autoexception:: YangTypeError
.. _7.3: https://tools.ietf.org/html/rfc7950#section-7.3 .. _7.3: https://tools.ietf.org/html/rfc7950#section-7.3
.. _9.1: https://tools.ietf.org/html/rfc7950#section-9.1 .. _9.1: https://tools.ietf.org/html/rfc7950#section-9.1
.. _9.7.4.2: https://tools.ietf.org/html/rfc7950#section-9.7.4.2 .. _9.7.4.2: https://tools.ietf.org/html/rfc7950#section-9.7.4.2
......
******************** **********
Base Exception Class Exceptions
******************** **********
.. module:: yangson.exceptions .. automodule:: yangson.exceptions
:synopsis: Base exception class :members:
.. autoexception:: YangsonException
:show-inheritance: :show-inheritance:
...@@ -681,23 +681,6 @@ __ http://www.sphinx-doc.org/en/stable/ext/doctest.html ...@@ -681,23 +681,6 @@ __ http://www.sphinx-doc.org/en/stable/ext/doctest.html
>>> str(irt2) >>> str(irt2)
'/example-2:bag/baz' '/example-2:bag/baz'
.. autoexception:: InstanceException(inst: InstanceNode)
:show-inheritance:
The *inst* argument is the initial instance from which the failed
operation was attempted.
.. autoexception:: InstanceValueError
:show-inheritance:
The *detail* argument gives details about the value mismatch.
.. autoexception:: NonexistentInstance
:show-inheritance:
The *detail* argument gives details about why the instance doesn't
exist.
.. _4: https://tools.ietf.org/html/rfc7951#section-4 .. _4: https://tools.ietf.org/html/rfc7951#section-4
.. _6.1: https://tools.ietf.org/html/rfc7951#section-6.1 .. _6.1: https://tools.ietf.org/html/rfc7951#section-6.1
.. _7.6.1: https://tools.ietf.org/html/rfc7950#section-7.6.1 .. _7.6.1: https://tools.ietf.org/html/rfc7950#section-7.6.1
......
...@@ -278,17 +278,3 @@ This module also defines the following exceptions: ...@@ -278,17 +278,3 @@ This module also defines the following exceptions:
>>> q.yang_identifier() >>> q.yang_identifier()
'foo-bar' 'foo-bar'
.. autoexception:: ParserException(p: Parser)
:show-inheritance:
The argument *p* is the parser instance that caused the exception.
.. autoexception:: EndOfInput(p: Parser)
:show-inheritance:
.. autoexception:: UnexpectedInput(p: Parser, expected: str = None)
:show-inheritance:
The argument *expected* is the string that was expected instead, if
there is any.
...@@ -468,62 +468,6 @@ __ http://www.sphinx-doc.org/en/stable/ext/doctest.html ...@@ -468,62 +468,6 @@ __ http://www.sphinx-doc.org/en/stable/ext/doctest.html
... dm.schema_data, ('example-3-a', '2016-06-18')).parse() ... dm.schema_data, ('example-3-a', '2016-06-18')).parse()
False False
.. autoexception:: MissingModule(name: YangIdentifier, rev: str = "")
The arguments specify the name and optional revision of the missing
module.
.. autoexception:: ModuleNotFound(name: YangIdentifier, rev: str = "")
:show-inheritance:
.. autoexception:: ModuleNotRegistered(name: YangIdentifier, rev: str = "")
:show-inheritance:
.. autoexception:: ModuleNotImplemented(name: YangIdentifier, rev: str = "")
:show-inheritance:
.. autoexception:: BadYangLibraryData
:show-inheritance:
The *reason* argument is a text describing the problem.
.. autoexception:: BadPath
:show-inheritance:
The *path* argument contains the invalid path.
.. autoexception:: UnknownPrefix
:show-inheritance:
The *prefix* argument contains the unknown prefix.
.. autoexception:: ModuleNotImported(mod: YangIdentifier, mid: ModuleId)
:show-inheritance:
Module *mod* is expected to be imported from a module or
submodule whose :term:`module identifier` is *mid*.
.. autoexception:: InvalidFeatureExpression
:show-inheritance:
.. autoexception:: FeaturePrerequisiteError(name: YangIdentifier, ns: YangIdentifier)
:show-inheritance:
The *name* and *ns* arguments contain the name and namespace of the
feature for which a pre-requisite feature is not supported by the
data model.
.. autoexception:: MultipleImplementedRevisions(module: YangIdentifier)
:show-inheritance:
See sec. `5.6.5`_ of [RFC7950]_ for further explanation. The *module*
argument contains the name of the module with multiple implemented revisions.
.. autoexception:: CyclicImports
:show-inheritance:
See sec. `5.1`_ of [RFC7950]_ for further explanation.
.. _5.6.5: https://tools.ietf.org/html/rfc7950#section-5.6.5 .. _5.6.5: https://tools.ietf.org/html/rfc7950#section-5.6.5
.. _5.1: https://tools.ietf.org/html/rfc7950#section-5.1 .. _5.1: https://tools.ietf.org/html/rfc7950#section-5.1
.. _6.4.1: https://tools.ietf.org/html/rfc7950#section-6.4.1 .. _6.4.1: https://tools.ietf.org/html/rfc7950#section-6.4.1
...@@ -650,49 +650,6 @@ or **uses** statement if this statement is conditional, i.e. has a ...@@ -650,49 +650,6 @@ or **uses** statement if this statement is conditional, i.e. has a
This class is a subclass of :class:`GroupNode`. Its instances This class is a subclass of :class:`GroupNode`. Its instances
represent YANG **notification** nodes. represent YANG **notification** nodes.
.. autoexception:: SchemaNodeException(sn: SchemaNode)
The schema node for which the exception occurred is passed in the
*sn* argument.
.. autoexception:: NonexistentSchemaNode(sn: SchemaNode, name: YangIdentifier, ns: YangIdentifier)
:show-inheritance:
The arguments *name* and *ns* give the name and namespace of the
non-existent schema node.
.. autoexception:: BadSchemaNodeType(sn: SchemaNode, expected: str)
:show-inheritance:
The argument *expected* describes what type was expected.
.. autoexception:: BadLeafrefPath(sn: SchemaNode)
:show-inheritance:
.. autoexception:: RawDataError(jptr: JSONPointer)
.. autoexception:: RawMemberError(jptr: JSONPointer)
:show-inheritance:
.. autoexception:: RawTypeError(jptr: JSONPointer, detail: str)
:show-inheritance:
.. autoexception:: ValidationError(inst: InstanceNode, detail: str)
The *inst* argument contains the instance node that was found
invalid, and *detail* provides additional information about the
error.
.. autoexception:: SchemaError
:show-inheritance:
See :term:`schema error`.
.. autoexception:: SemanticError
:show-inheritance:
See :term:`semantic error`.
.. _7.5.3: https://tools.ietf.org/html/rfc7950#section-7.5.3 .. _7.5.3: https://tools.ietf.org/html/rfc7950#section-7.5.3
.. _7.8.3: https://tools.ietf.org/html/rfc7950#section-7.8.3 .. _7.8.3: https://tools.ietf.org/html/rfc7950#section-7.8.3
.. _7.9.2: https://tools.ietf.org/html/rfc7950#section-7.9.2 .. _7.9.2: https://tools.ietf.org/html/rfc7950#section-7.9.2
......
...@@ -174,18 +174,3 @@ __ http://www.sphinx-doc.org/en/stable/ext/doctest.html ...@@ -174,18 +174,3 @@ __ http://www.sphinx-doc.org/en/stable/ext/doctest.html
... m5atxt = infile.read() ... m5atxt = infile.read()
>>> str(ModuleParser(m5atxt).parse()) >>> str(ModuleParser(m5atxt).parse())
'module "example-5-a" { ... }' 'module "example-5-a" { ... }'
.. exception:: StatementNotFound(parent: Statement, kw: YangIdentifier)
A statement with keyword *kw* was not found as a substatement of
*parent*.
.. exception:: DefinitionNotFound(kw: YangIdentifier, name: YangIdentifier)
Definition of a grouping or typedef was not found. Argument *kw*
is the keyword of the definition statement (``grouping`` or
``typedef``), and *name* is the name of the definition.
.. exception:: WrongArgument(stmt: Statement)
The argument of statement *stmt* is invalid.
...@@ -73,11 +73,6 @@ The module also defines the following exception: ...@@ -73,11 +73,6 @@ The module also defines the following exception:
evaluates to a value whose type is not allowed at a given evaluates to a value whose type is not allowed at a given
place. place.
.. autoexception:: XPathTypeError(value: XPathValue)
The *value* argument contains the XPath value that causes the
problem.
Parser of XPath Expressions Parser of XPath Expressions
=========================== ===========================
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment