public string GetErrorMessage(string error) { if (error is null) { throw new ArgumentNullException(nameof(error)); } return(PredefinedEvaluationErrorMessagesHelper.GetErrorMessage(error)); }
DbgValueNodeAssignmentResult CreateResult(DbgEngineValueNodeAssignmentResult result) { if (result.Error is not null) { if (engineValueNode.Value != value?.EngineValue) { throw new InvalidOperationException(); } return(new DbgValueNodeAssignmentResult(result.Flags, PredefinedEvaluationErrorMessagesHelper.GetErrorMessage(result.Error))); } return(new DbgValueNodeAssignmentResult(result.Flags, result.Error)); }
DbgEvaluationResult CreateResult(DbgRuntime runtime, DbgEngineEvaluationResult result) { if (result.Error != null) { return(new DbgEvaluationResult(PredefinedEvaluationErrorMessagesHelper.GetErrorMessage(result.Error), result.FormatSpecifiers, result.Flags)); } try { var value = new DbgValueImpl(runtime, result.Value); runtime.CloseOnContinue(value); return(new DbgEvaluationResult(value, result.FormatSpecifiers, result.Flags)); } catch { runtime.Process.DbgManager.Close(result.Value); throw; } }
DbgEEAssignmentResult CreateResult(DbgEngineEEAssignmentResult result) => new DbgEEAssignmentResult(result.Flags, PredefinedEvaluationErrorMessagesHelper.GetErrorMessage(result.Error));