Repository: lucenenet
Updated Branches:
  refs/heads/api-work 65fb35cd7 -> 6314c2478


Lucene.Net.Core.Index.IndexWriter: Updated ForceMerge exception code to be more 
like the original


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/a46f3f5c
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/a46f3f5c
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/a46f3f5c

Branch: refs/heads/api-work
Commit: a46f3f5c6559dd9aa28d44742e0258505680d45c
Parents: 65fb35c
Author: Shad Storhaug <[email protected]>
Authored: Thu Mar 16 13:59:34 2017 +0700
Committer: Shad Storhaug <[email protected]>
Committed: Thu Mar 16 13:59:34 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Index/IndexWriter.cs | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a46f3f5c/src/Lucene.Net.Core/Index/IndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexWriter.cs 
b/src/Lucene.Net.Core/Index/IndexWriter.cs
index e8370d6..500bc94 100644
--- a/src/Lucene.Net.Core/Index/IndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/IndexWriter.cs
@@ -2170,21 +2170,18 @@ namespace Lucene.Net.Index
                             int size = mergeExceptions.Count;
                             for (int i = 0; i < size; i++)
                             {
-                                // LUCENENET TODO: Perhaps it would make more 
sense to throw an Exception (IOException??)
-                                // that has an AggregateException passed as 
its innerException argument.
-                                // But, need to investigate what type of 
exceptions this should throw and make sure 
-                                // the exception thrown here is caught in the 
right places, if necessary.
-
                                 MergePolicy.OneMerge merge = 
mergeExceptions[i];
                                 if (merge.MaxNumSegments != -1)
                                 {
-                                    throw new 
System.IO.IOException("background merge hit exception: " + 
merge.SegString(directory), merge.Exception ?? new Exception());
-                                    /*Exception t = merge.Exception;
+                                    string message = "background merge hit 
exception: " + merge.SegString(directory);
+                                    Exception t = merge.Exception;
                                     if (t != null)
                                     {
-                                      err.initCause(t);
+                                        //err.initCause(t);
+                                        throw new IOException(message + 
t.ToString(), t);
                                     }
-                                    throw err;*/
+                                    //throw err;
+                                    throw new IOException(message);
                                 }
                             }
                         }

Reply via email to