pip_services3_commons.errors.ErrorDescriptionFactory module
pip_services3_commons.errors.ErrorDescriptionFactory
Error description factory implementation
- copyright
Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.
- license
MIT, see LICENSE for more details.
-
class
pip_services3_commons.errors.ErrorDescriptionFactory.
ErrorDescriptionFactory
Bases:
object
Factory to create serializeable
ErrorDescription
fromApplicationException
or from arbitrary errors.The ErrorDescriptions are used to pass errors through the wire between microservices implemented in different languages. They allow to restore exceptions on the receiving side close to the original type and preserve additional information.
-
static
create
(ex: Any) → pip_services3_commons.errors.ErrorDescription.ErrorDescription Creates a serializable ErrorDescription from error object.
- Parameters
ex – an error object
- Returns
a serializeable ErrorDescription object that describes the error.
-
static