c3d716f6fd
* Cancel all channels when first exception happens then throw that exception * Use single exception to end things. * fix verifications * fmt * Fix tests as stacktrace was removed * Handle one exception and cancel on receive * moved ThrowIfFailed and made throw speckle exceptions * Fixed tests * fmt
19 lines
520 B
C#
19 lines
520 B
C#
using Argon;
|
|
|
|
namespace Speckle.Sdk.Testing.Framework;
|
|
|
|
public class ExceptionScrubber : WriteOnlyJsonConverter<Exception>
|
|
{
|
|
public override void Write(VerifyJsonWriter writer, Exception value)
|
|
{
|
|
var ex = new JObject
|
|
{
|
|
["Type"] = value.GetType().FullName,
|
|
["Message"] = value.Message,
|
|
["Source"] = value.Source?.Trim(),
|
|
};
|
|
//intentionally removed stacktrace to avoid errors on different machines and line numbers
|
|
writer.WriteRawValue(ex.ToString(Formatting.Indented));
|
|
}
|
|
}
|