Skip to content

Commit

Permalink
#20 trying again
Browse files Browse the repository at this point in the history
  • Loading branch information
mgroves committed Sep 25, 2023
1 parent baf9899 commit 6b50904
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Conduit/Conduit.Tests/TestHelpers/JsonTestHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ public static T SubDoc<T>(this string @this, string subDocKey)
throw new ArgumentException($"SubDoc '{subDocKey}' not found in JSON.");
return obj[subDocKey].ToObject<T>();
}
catch
{
Trace.WriteLine("TRACE There was a problem getting the subdoc of '{subDocKey}' from this JSON string: '{@this}");
Debug.Print($"DEBUG There was a problem getting the subdoc of '{subDocKey}' from this JSON string: '{@this}");
var logfactory = (ILoggerFactory)new LoggerFactory();
var logger = new Logger<Conduit.Web.Program>(logfactory);
logger.LogError($"TRACE There was a problem getting the subdoc of '{subDocKey}' from this JSON string: '{@this}");
throw;
catch (Exception ex)
{
throw new ArgumentException($"TRACE There was a problem getting the subdoc of '{subDocKey}' from this JSON string: '{@this}", ex);
}
}
}

0 comments on commit 6b50904

Please sign in to comment.