public static void HandleDeserializationError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs errorArgs) { var currentError = errorArgs.ErrorContext.Error.Message; UnityEngine.Debug.LogError("CloudLoader.HandleDeserializationError -" + currentError); errorArgs.ErrorContext.Handled = true; }
private static void DeserializeErrorHandler(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs e) { if (e.ErrorContext.Error.Message.Contains("Aurora.Devices.SteelSeriesHID.SteelSeriesHIDDevice") && e.CurrentObject is HashSet <Type> dd) { dd.Add(typeof(Aurora.Devices.UnifiedHID.UnifiedHIDDevice)); e.ErrorContext.Handled = true; } }
private static void HandleDeserializationError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs e) { var currentError = e.ErrorContext.Error.Message; Main.DebugLog(currentError); e.ErrorContext.Handled = true; }
internal void OnError(Newtonsoft.Json.Serialization.ErrorEventArgs e) { EventHandler <Newtonsoft.Json.Serialization.ErrorEventArgs> eventHandler = this.Error; if (eventHandler != null) { eventHandler(this, e); } }
internal void OnError(ErrorEventArgs e) { EventHandler <ErrorEventArgs> error = Error; if (error != null) { error(this, e); } }
internal void method_3(Newtonsoft.Json.Serialization.ErrorEventArgs errorEventArgs_0) { EventHandler <Newtonsoft.Json.Serialization.ErrorEventArgs> handler = this.eventHandler_0; if (handler != null) { handler(this, errorEventArgs_0); } }
internal void OnError(Newtonsoft.Json.Serialization.ErrorEventArgs e) { EventHandler <Newtonsoft.Json.Serialization.ErrorEventArgs> eventHandler = this.Error; if (eventHandler == null) { return; } eventHandler((object)this, e); }
private static void ErrorHandler(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs args) { string error = args.ErrorContext.Error.Message; error = error.Replace("Could not find member", "Editor doesn't expect"); sb.AppendLine(error); errorCounter++; args.ErrorContext.Handled = true; }
private void LoadProfilesError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs e) { if (e.CurrentObject.GetType().Equals(typeof(ObservableCollection <Layer>))) { e.ErrorContext.Handled = true; } if (e.CurrentObject.GetType() == typeof(Layer) && e.ErrorContext.Member.Equals("Handler")) { ((Layer)e.ErrorContext.OriginalObject).Handler = null; e.ErrorContext.Handled = true; } }
protected virtual void LoadProfilesError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs e) { if (e.CurrentObject != null) { if (e.CurrentObject.GetType().Equals(typeof(ObservableCollection <Layer>))) { e.ErrorContext.Handled = true; } if (e.CurrentObject.GetType() == typeof(Layer) && e.ErrorContext.Member.Equals("Handler")) { ((Layer)e.ErrorContext.OriginalObject).Handler = null; e.ErrorContext.Handled = true; } } else if (e.ErrorContext.Path.Equals("$type") && e.ErrorContext.Member == null && e.ErrorContext.Error.Message.Contains("WrapperProfile")) { MessageBox.Show($"The profile type for {this.Config.Name} has been changed, your profile will be reset and your old one moved to have the extension '.corrupted', ignore the following error", "Profile type changed", MessageBoxButton.OK, MessageBoxImage.Information); } }
private static void ErrorHandler(object?_, Newtonsoft.Json.Serialization.ErrorEventArgs e, string filename) { throw new InvalidDataException("This file \"" + filename + "\" does not match the format for JSON. Check if it isn't corrupted by opening it in Notepad or another text editor.", e.ErrorContext.Error); }
private static void HandleError(object sender, ErrorEventArgs e) { if (FullInspectorSettings.EmitWarnings) { Debug.LogWarning(JsonNetSerializer.FormatError(e.ErrorContext)); } e.ErrorContext.Handled = true; }
internal void OnError(ErrorEventArgs e) { Error?.Invoke(this, e); }
private void OnJsonError(object sender, ErrorEventArgs errorEventArgs) { _logger.LogError(errorEventArgs?.ErrorContext?.Error?.Message); _logger.LogError($"JSON Parse Error at '{errorEventArgs?.ErrorContext?.Path}'"); }
internal void OnError(ErrorEventArgs e) { EventHandler<ErrorEventArgs> error = Error; if (error != null) error(this, e); }
/// <summary> /// Called when a JSON error occurs. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="ErrorEventArgs"/> instance containing the event data.</param> /// <remarks>Prevents exceptions bubbling up to the consumer.</remarks> private static void OnError(object sender, ErrorEventArgs e) { e.ErrorContext.Handled = true; }
private static void deserialiseErrorEventHandler(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs e) { }
private static void HandleSerializationError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs e) { // var currentError = e.ErrorContext.Error.Message; e.ErrorContext.Handled = false; }
void DeserializerOnError(object sender, ErrorEventArgs errorEventArgs) { errorStrategy.HandleErrorOnDeserialize(sender, errorEventArgs); }
static void IgnoreError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs args) { }
public void HandleError(object source, Newtonsoft.Json.Serialization.ErrorEventArgs args) { args.ErrorContext.Handled = true; }
public void HandleDeserializationError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs errorArgs) { var currentError = errorArgs.ErrorContext.Error.Message; errorArgs.ErrorContext.Handled = true; }
private static void HandleDeserializationError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs errorArgs) { Debug.LogWarning($"Json deserialization error: {errorArgs.ErrorContext.Error.Message}"); errorArgs.ErrorContext.Handled = true; }
/// <summary> /// Json.NET callback for when an error occurs. We simply print out the error and continue /// with the deserialization process. /// </summary> private static void HandleError(object sender, ErrorEventArgs e) { if (fiSettings.EmitWarnings) { Debug.LogWarning(FormatError(e.ErrorContext)); } e.ErrorContext.Handled = true; }
private static void OnError(object sender, ErrorEventArgs e) { //MainLog.Logger.Warn($"Error during JSON serialization for {e.CurrentObject}, {e.ErrorContext.Path} {e.ErrorContext.Member}: {e.ErrorContext.Error.Message}"); }
static void HandleError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs args, string context) { Log.Error($"JSON-related error ({context}): {args.ErrorContext.Error}"); args.ErrorContext.Handled = true; }
/// <summary> /// Metodo di supporto che serve per aiutare il serializzatore JSON a ignorare eventuali /// errori riscontrati durante il processo di serializzazione. /// </summary> /// <param name="sender">L'oggetto che ha prodotto l'errore.</param> /// <param name="errorArgs">Il contesto in cui è avvenuto l'errore.</param> private static void IgnoreJsonSerializationError(object sender, ErrorEventArgs errorArgs) { errorArgs.ErrorContext.Handled = true; }
private void Error(object sender, ErrorEventArgs errorEventArgs) { _errors.Add(errorEventArgs); errorEventArgs.ErrorContext.Handled = true; }
private static void Error(object sender, ErrorEventArgs errorEventArgs) { Errors.Add(errorEventArgs); errorEventArgs.ErrorContext.Handled = true; }
private static void OnSerializationError(Newtonsoft.Json.Serialization.ErrorEventArgs args) { Diagnostics.Debug.WriteLine(args.ErrorContext.Error.Message); args.ErrorContext.Handled = true; }
private static void IgnoreDeserializationError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs errorArgs) { Logger.Log(errorArgs.ErrorContext.Error.Message); errorArgs.ErrorContext.Handled = true; }
private void Serializer_Error(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs e) { e.ErrorContext.Handled = true; }
private static void SuppressErrors(object sender, ErrorEventArgs e) { e.ErrorContext.Handled = true; }
internal void OnError(Newtonsoft.Json.Serialization.ErrorEventArgs e) { this.Error?.Invoke(this, e); }
static void OnError(object sender, ErrorEventArgs e) { e.ToString(); }
private void DeserializationErrorHandler(object sender, ErrorEventArgs errorArgs) { errorArgs.ErrorContext.Handled = true; }
/// <summary> /// Error handler for json deserialization errors. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="ErrorEventArgs"/> instance containing the event data.</param> protected virtual void HandleJsonSerializationError(object sender, ErrorEventArgs args) { this.Logger.Error( args.ErrorContext.Error, Strings.DefaultJsonSerializerSettingsProvider_ErrorOnSerializingObjectMessage, args.CurrentObject?.GetType()); }