Skip to content

Commit

Permalink
Revert ConfigurationException due to binary incompatibility (akkadotn…
Browse files Browse the repository at this point in the history
…et#6201)

* Revert ConfigurationException due to binary incompatibility

* Update API Verify list

(cherry picked from commit 90dde25)
  • Loading branch information
Arkatufus committed Oct 20, 2022
1 parent b45065e commit d0b5c63
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2239,7 +2239,7 @@ namespace Akka.Configuration
public ConfigurationException(string message) { }
public ConfigurationException(string message, System.Exception exception) { }
protected ConfigurationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public static Akka.Configuration.ConfigurationException NullOrEmptyConfig<T>(string path = null, string reason = null) { }
public static Akka.Configuration.ConfigurationException NullOrEmptyConfig<T>(string path = null) { }
}
public class ConfigurationFactory
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Cluster/ClusterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public ClusterSettings(Config config, string systemName)
//TODO: Requiring!
var clusterConfig = config.GetConfig("akka.cluster");
if (clusterConfig?.GetConfig("failure-detector") == null)
throw ConfigurationException.NullOrEmptyConfig<ClusterSettings>("akka.cluster", "Did you forgot to set the 'akka.cluster.provider' HOCON property to 'cluster'?");
throw new ConfigurationException($"Failed to instantiate {nameof(ClusterSettings)}: Configuration does not contain `akka.cluster` node. Did you forgot to set the 'akka.cluster.provider' HOCON property to 'cluster'?");

LogInfoVerbose = clusterConfig.GetBoolean("log-info-verbose", false);
LogInfo = LogInfoVerbose || clusterConfig.GetBoolean("log-info", false);
Expand Down
6 changes: 3 additions & 3 deletions src/core/Akka/Configuration/ConfigurationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ namespace Akka.Configuration
/// </summary>
public class ConfigurationException : AkkaException
{
public static ConfigurationException NullOrEmptyConfig<T>(string path = null, string reason = null)
public static ConfigurationException NullOrEmptyConfig<T>(string path = null)
{
if (!string.IsNullOrWhiteSpace(path))
return new ConfigurationException($"Failed to instantiate {typeof(T).Name}: Configuration does not contain `{path}` node{(reason != null ? $". {reason}" : "")}");
return new ConfigurationException($"Failed to instantiate {typeof(T).Name}: Configuration is null or empty{(reason != null ? $". {reason}" : "")}");
return new ConfigurationException($"Failed to instantiate {typeof(T).Name}: Configuration does not contain `{path}` node");
return new ConfigurationException($"Failed to instantiate {typeof(T).Name}: Configuration is null or empty");
}

/// <summary>
Expand Down

0 comments on commit d0b5c63

Please sign in to comment.