From 96143f7e60f5fa563b848ff4be8ad22fc16d4a9c Mon Sep 17 00:00:00 2001 From: Sylvain Bellemare Date: Mon, 28 Nov 2016 19:27:22 +0100 Subject: [PATCH] Use explicit chaining to capture the cause --- bigchaindb/common/schema/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigchaindb/common/schema/__init__.py b/bigchaindb/common/schema/__init__.py index 6bb4f038..9fdb3136 100644 --- a/bigchaindb/common/schema/__init__.py +++ b/bigchaindb/common/schema/__init__.py @@ -18,7 +18,7 @@ def validate_transaction_schema(tx_body): try: jsonschema.validate(tx_body, TX_SCHEMA) except jsonschema.ValidationError as exc: - raise SchemaValidationError(str(exc)) + raise SchemaValidationError(str(exc)) from exc __all__ = ['TX_SCHEMA', 'TX_SCHEMA_YAML', 'validate_transaction_schema']