Skip to content

Commit

Permalink
Implemented property RemotingConfiguration.CustomErrorsMode. fixes mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
sancheolz committed Mar 1, 2019
1 parent 7bbe8ca commit 6b07dbe
Showing 1 changed file with 6 additions and 7 deletions.
Expand Up @@ -53,7 +53,7 @@ public static class RemotingConfiguration
static string processGuid = null;
static bool defaultConfigRead = false;
static bool defaultDelayedConfigRead = false;
static string _errorMode;
static CustomErrorsModes _errorMode;

static Hashtable wellKnownClientEntries = new Hashtable();
static Hashtable activatedClientEntries = new Hashtable();
Expand Down Expand Up @@ -81,11 +81,10 @@ public static string ApplicationName
set { applicationName = value; }
}

[MonoTODO]
public static CustomErrorsModes CustomErrorsMode
{
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
get { return _errorMode; }
set { _errorMode = value; }
}

public static string ProcessId
Expand Down Expand Up @@ -387,8 +386,8 @@ internal static void RegisterTypes (ArrayList types)

public static bool CustomErrorsEnabled (bool isLocalRequest)
{
if (_errorMode == "off") return false;
if (_errorMode == "on") return true;
if (_errorMode == CustomErrorsModes.Off) return false;
if (_errorMode == CustomErrorsModes.On) return true;
return !isLocalRequest;
}

Expand All @@ -403,7 +402,7 @@ internal static void SetCustomErrorsMode (string mode)
if (m != "on" && m != "off" && m != "remoteonly")
throw new RemotingException ("Invalid custom error mode: " + mode);

_errorMode = m;
_errorMode = (CustomErrorsModes) Enum.Parse(typeof(CustomErrorsModes), m, true);
}
}

Expand Down

0 comments on commit 6b07dbe

Please sign in to comment.