public void JsonSchemaException()
    {
      JsonSchemaException exception = new JsonSchemaException();
      Assert.AreEqual("Exception of type 'Newtonsoft.Json4.Schema.JsonSchemaException' was thrown.", exception.Message);

      exception = new JsonSchemaException("Message!");
      Assert.AreEqual("Message!", exception.Message);
      Assert.AreEqual(null, exception.InnerException);

      exception = new JsonSchemaException("Message!", new Exception("Inner!"));
      Assert.AreEqual("Message!", exception.Message);
      Assert.AreEqual("Inner!", exception.InnerException.Message);
    }
 internal ValidationEventArgs(JsonSchemaException ex)
 {
   ValidationUtils.ArgumentNotNull(ex, "ex");
   _ex = ex;
 }
 private void OnValidationEvent(JsonSchemaException exception)
 {
   ValidationEventHandler handler = ValidationEventHandler;
   if (handler != null)
     handler(this, new ValidationEventArgs(exception));
   else
     throw exception;
 }