2015-08-26 07:17:56 -04:00
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
|
|
namespace System.Runtime.Serialization {
|
|
|
|
|
2018-06-07 18:52:37 +00:00
|
|
|
internal static partial class DiagnosticUtility {
|
2015-08-26 07:17:56 -04:00
|
|
|
internal static bool ShouldTraceError = true;
|
2017-04-10 11:41:01 +00:00
|
|
|
internal static readonly bool ShouldTraceWarning = false;
|
|
|
|
internal static readonly bool ShouldTraceInformation = false;
|
2015-08-26 07:17:56 -04:00
|
|
|
internal static bool ShouldTraceVerbose = true;
|
|
|
|
|
|
|
|
internal static class DiagnosticTrace {
|
|
|
|
internal static void TraceEvent (params object [] args)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static class ExceptionUtility {
|
|
|
|
internal static Exception ThrowHelperError (Exception e)
|
|
|
|
{
|
|
|
|
return ThrowHelper (e, TraceEventType.Error);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static Exception ThrowHelperCallback (string msg, Exception e)
|
|
|
|
{
|
|
|
|
return new CallbackException (msg, e);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static Exception ThrowHelperCallback (Exception e)
|
|
|
|
{
|
|
|
|
return new CallbackException ("Callback exception", e);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static Exception ThrowHelper (Exception e, TraceEventType type)
|
|
|
|
{
|
|
|
|
return e;
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static Exception ThrowHelperArgument (string arg)
|
|
|
|
{
|
|
|
|
return new ArgumentException (arg);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static Exception ThrowHelperArgument (string arg, string message)
|
|
|
|
{
|
|
|
|
return new ArgumentException (message, arg);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static Exception ThrowHelperArgumentNull (string arg)
|
|
|
|
{
|
|
|
|
return new ArgumentNullException (arg);
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static Exception ThrowHelperFatal (string msg, Exception e)
|
|
|
|
{
|
|
|
|
return new FatalException (msg, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|