Skip to content

Commit

Permalink
Making it easier to debug an exception + various cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
synhershko committed Mar 1, 2015
1 parent 979403c commit 3c73a17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Lucene.Net.Core/Index/IndexWriter.cs
Expand Up @@ -904,7 +904,7 @@ public IndexWriter(Directory d, IndexWriterConfig conf)
// points.
if (commit.Directory != directory)
{
throw new System.ArgumentException("IndexCommit's directory doesn't match my directory");
throw new ArgumentException(string.Format("IndexCommit's directory doesn't match my directory (mine: {0}, commit's: {1})", directory, commit.Directory));
}
SegmentInfos oldInfos = new SegmentInfos();
oldInfos.Read(directory, commit.SegmentsFileName);
Expand Down Expand Up @@ -2861,7 +2861,7 @@ internal virtual void CheckpointNoSIS()

/// <summary>
/// Called internally if any index state has changed. </summary>
internal virtual void Changed()
internal void Changed()
{
lock (this)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
Expand Up @@ -49,7 +49,7 @@ namespace Lucene.Net.Util
/// final boolean isDeprecatedMethodOverridden =
/// VirtualMethod.compareImplementationDistance(this.getClass(), oldMethod, newMethod) > 0
/// </pre>
/// <p><seealso cref="getImplementationDistance"/> returns the distance of the subclass that overrides this method.
/// <p><seealso cref="GetImplementationDistance"/> returns the distance of the subclass that overrides this method.
/// The one with the larger distance should be used preferable.
/// this way also more complicated method rename scenarios can be handled
/// (think of 2.9 {@code TokenStream} deprecations).</p>
Expand All @@ -67,9 +67,9 @@ public sealed class VirtualMethod<C>

/// <summary>
/// Creates a new instance for the given {@code baseClass} and method declaration. </summary>
/// <exception cref="UnsupportedOperationException"> if you create a second instance of the same
/// <exception cref="InvalidOperationException"> if you create a second instance of the same
/// {@code baseClass} and method declaration combination. this enforces the singleton status. </exception>
/// <exception cref="IllegalArgumentException"> if {@code baseClass} does not declare the given method. </exception>
/// <exception cref="ArgumentException"> if {@code baseClass} does not declare the given method. </exception>
public VirtualMethod(Type baseClass, string method, params Type[] parameters)
{
this.BaseClass = baseClass;
Expand Down

0 comments on commit 3c73a17

Please sign in to comment.