class_docstr: Report violations of a given JSON schema.
  
  This class extends :exc:`~fastjsonschema.JsonSchemaValueException`
  by adding the following properties:
  
  - ``summary``: an improved version of the ``JsonSchemaValueException`` error message
    with only the necessary information)
  
  - ``details``: more contextual information about the error like the failing schema
    itself and the value that violates the schema.
  
  Depending on the level of the verbosity of the ``logging`` configuration
  the exception message will be only ``summary`` (default) or a combination of
  ``summary`` and ``details`` (when the logging level is set to :obj:`logging.DEBUG`).
class_docstr_tok: ["Report","violations","of","a","given","JSON","schema",".","This","class","extends",":","exc",":","`","~fastjsonschema.JsonSchemaValueException","`","by","adding","the","following","properties",":","-","``","summary","``",":","an","improved","version","of","the","``","JsonSchemaValueException","``","error","message","with","only","the","necessary","information",")","-","``","details","``",":","more","contextual","information","about","the","error","like","the","failing","schema","itself","and","the","value","that","violates","the","schema",".","Depending","on","the","level","of","the","verbosity","of","the","``","logging","``","configuration","the","exception","message","will","be","only","``","summary","``","(","default",")","or","a","combination","of","``","summary","``","and","``","details","``","(","when","the","logging","level","is","set","to",":","obj",":","`","logging.DEBUG","`",")","."]
code: def _from_jsonschema(cls, ex: JsonSchemaValueException):
      formatter = _ErrorFormatting(ex)
      obj = cls(
          str(formatter),
          ex.value,
          formatter.name,
          ex.definition,
          ex.rule,
      )
      debug_code = os.getenv(
          "JSONSCHEMA_DEBUG_CODE_GENERATION", "false"
      ).lower()
      if debug_code != "false":  # pragma: no cover
          obj.__cause__, obj.__traceback__ = (
              ex.__cause__,
              ex.__traceback__,
          )
      obj._original_message = ex.message
      obj.summary = formatter.summary
      obj.details = formatter.details
      return obj
  
imports: import io
  import json
  import logging
  import os
  import re
  from contextlib import contextmanager
  from textwrap import indent, wrap
  from typing import Any, Dict, Iterator, List, Optional, Sequence, Union, cast
  from .fastjsonschema_exceptions import JsonSchemaValueException
label_desc: Use image node_id 1 for calling the ValidationError obj's underlying member method code with example usage: obj._from_jsonschema(cls, ex) and returns: obj