You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
@ -82,6 +82,9 @@ namespace System.Web.Hosting {
|
||||
// delegate OnRespondToPing
|
||||
private WaitCallback _onRespondToPingWaitCallback;
|
||||
|
||||
// flag indicates whether any fatal exception has been recorded
|
||||
private bool _fatalExceptionRecorded = false;
|
||||
|
||||
// single instance of app manager
|
||||
private static ApplicationManager _theAppManager;
|
||||
|
||||
@ -154,6 +157,16 @@ namespace System.Web.Hosting {
|
||||
}
|
||||
}
|
||||
|
||||
private bool FatalExceptionRecorded
|
||||
{
|
||||
get {
|
||||
return _fatalExceptionRecorded;
|
||||
}
|
||||
set {
|
||||
_fatalExceptionRecorded = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void RecordFatalException(Exception e) {
|
||||
RecordFatalException(AppDomain.CurrentDomain, e);
|
||||
}
|
||||
@ -168,7 +181,7 @@ namespace System.Web.Hosting {
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnUnhandledException(Object sender, UnhandledExceptionEventArgs eventArgs) {
|
||||
internal static void OnUnhandledException(Object sender, UnhandledExceptionEventArgs eventArgs) {
|
||||
// if the CLR is not terminating, ignore the notification
|
||||
if (!eventArgs.IsTerminating) {
|
||||
return;
|
||||
@ -184,6 +197,15 @@ namespace System.Web.Hosting {
|
||||
return;
|
||||
}
|
||||
|
||||
// If any fatal exception was recorded in applicaiton AppDomains,
|
||||
// we wouldn't record exceptions in the default AppDomain.
|
||||
var appManager = GetApplicationManager();
|
||||
if (AppDomain.CurrentDomain.IsDefaultAppDomain() && appManager.FatalExceptionRecorded) {
|
||||
return;
|
||||
}
|
||||
|
||||
appManager.FatalExceptionRecorded = true;
|
||||
|
||||
RecordFatalException(appDomain, exception);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user