Imported Upstream version 4.2.0.179

Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent aa7da660d6
commit c042cd0c52
7507 changed files with 90259 additions and 657307 deletions

View File

@@ -0,0 +1,61 @@
using System.Diagnostics;
namespace System.Runtime.Serialization {
internal static class DiagnosticUtility {
internal static bool ShouldTraceError = true;
internal static bool ShouldTraceWarning;
internal static bool ShouldTraceInformation;
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);
}
}
}
}