Skip to content

Commit fcb48c5

Browse files
committed
Minor refactoring (the message now include another possible cause)
SVN: trunk@4410
1 parent a624523 commit fcb48c5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/NHibernate/AssertionFailure.cs

+5-6
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ namespace NHibernate
1010
[Serializable]
1111
public class AssertionFailure : ApplicationException
1212
{
13+
private const string DefaultMessage = "An AssertionFailure occurred - this may indicate a bug in NHibernate or in your custom types.";
14+
1315
/// <summary>
1416
/// Initializes a new instance of the <see cref="AssertionFailure"/> class.
1517
/// </summary>
1618
public AssertionFailure() : base(String.Empty)
1719
{
18-
LogManager.GetLogger(typeof(AssertionFailure)).Error(
19-
"An AssertionFailure occurred - this may indicate a bug in NHibernate");
20+
LogManager.GetLogger(typeof(AssertionFailure)).Error(DefaultMessage);
2021
}
2122

2223
/// <summary>
@@ -25,8 +26,7 @@ public AssertionFailure() : base(String.Empty)
2526
/// <param name="message">The message that describes the error. </param>
2627
public AssertionFailure(string message) : base(message)
2728
{
28-
LogManager.GetLogger(typeof(AssertionFailure)).Error(
29-
"An AssertionFailure occurred - this may indicate a bug in NHibernate", this);
29+
LogManager.GetLogger(typeof(AssertionFailure)).Error(DefaultMessage, this);
3030
}
3131

3232
/// <summary>
@@ -40,8 +40,7 @@ public AssertionFailure(string message) : base(message)
4040
/// </param>
4141
public AssertionFailure(string message, Exception innerException) : base(message, innerException)
4242
{
43-
LogManager.GetLogger(typeof(AssertionFailure)).Error(
44-
"An AssertionFailure occurred - this may indicate a bug in NHibernate", innerException);
43+
LogManager.GetLogger(typeof(AssertionFailure)).Error(DefaultMessage, innerException);
4544
}
4645

4746
/// <summary>

0 commit comments

Comments
 (0)