lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [2/3] lucenenet git commit: There is no AccessViolationException to catch in .NET Core, so leaving the try-catch out in that case.
Date Fri, 07 Apr 2017 07:18:39 GMT
There is no AccessViolationException to catch in .NET Core, so leaving the try-catch out in
that case.


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

Branch: refs/heads/api-work
Commit: c2a506f635eaed8bb3c4e6e92f8baebb5ea1607e
Parents: 4be9593
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Apr 6 22:22:43 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Apr 7 14:02:07 2017 +0700

----------------------------------------------------------------------
 src/IcuBreakIterator.cs | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c2a506f6/src/IcuBreakIterator.cs
----------------------------------------------------------------------
diff --git a/src/IcuBreakIterator.cs b/src/IcuBreakIterator.cs
index f67915b..47e8f69 100644
--- a/src/IcuBreakIterator.cs
+++ b/src/IcuBreakIterator.cs
@@ -292,8 +292,10 @@ namespace Lucene.Net
             IEnumerable<Icu.Boundary> icuBoundaries;
             string offsetText = text.Substring(start, end - start);
 
+#if !NETSTANDARD
             try
             {
+#endif
                 if (type == Icu.BreakIterator.UBreakIteratorType.WORD)
                 {
                     if (enableHacks)
@@ -317,11 +319,15 @@ namespace Lucene.Net
 
                     icuBoundaries = Icu.BreakIterator.GetBoundaries(type, locale, offsetText);
                 }
+#if !NETSTANDARD
             }
             catch (AccessViolationException ace)
             {
+                // LUCENENET TODO: Find a reliable way to reproduce and report the 
+                // AccessViolationException that happens here to the icu-dotnet project team
                 throw new Exception("Hit AccessViolationException: " + ace.ToString(), ace);
             }
+#endif
 
             boundaries = icuBoundaries
                 .Select(t => new[] { t.Start + start, t.End + start })


Mime
View raw message