MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / PyAsn1Error

Class PyAsn1Error

pager_lib/pyasn1/error.py:9–44  ·  view source on GitHub ↗

Base pyasn1 exception `PyAsn1Error` is the base exception class (based on :class:`Exception`) that represents all possible ASN.1 related errors. Parameters ---------- args: Opaque positional parameters Keyword Args ------------ kwargs: Opaque ke

Source from the content-addressed store, hash-verified

7
8
9class PyAsn1Error(Exception):
10 """Base pyasn1 exception
11
12 `PyAsn1Error` is the base exception class (based on
13 :class:`Exception`) that represents all possible ASN.1 related
14 errors.
15
16 Parameters
17 ----------
18 args:
19 Opaque positional parameters
20
21 Keyword Args
22 ------------
23 kwargs:
24 Opaque keyword parameters
25
26 """
27 def __init__(self, *args, **kwargs):
28 self._args = args
29 self._kwargs = kwargs
30
31 @property
32 def context(self):
33 """Return exception context
34
35 When exception object is created, the caller can supply some opaque
36 context for the upper layers to better understand the cause of the
37 exception.
38
39 Returns
40 -------
41 : :py:class:`dict`
42 Dict holding context specific data
43 """
44 return self._kwargs.get('context', {})
45
46
47class ValueConstraintError(PyAsn1Error):

Callers 1

__call__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected