lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [09/26] lucenenet git commit: Lucene.Net.QueryParser.Flexible.Standard.Processors.NumericRangeQueryNodeProcessor: Added locale to error message to assist with debugging.
Date Wed, 08 Mar 2017 18:23:45 GMT
Lucene.Net.QueryParser.Flexible.Standard.Processors.NumericRangeQueryNodeProcessor: Added locale
to error message to assist with debugging.


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

Branch: refs/heads/api-work
Commit: 58a76127ed6502943977c8bb77c0a43df96c2eb4
Parents: f1c8b48
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Mar 8 10:04:55 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Mar 8 16:56:43 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Support/NumberFormat.cs                    | 5 +++++
 .../Standard/Processors/NumericRangeQueryNodeProcessor.cs      | 6 ++----
 src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj       | 1 +
 3 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/58a76127/src/Lucene.Net.Core/Support/NumberFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/NumberFormat.cs b/src/Lucene.Net.Core/Support/NumberFormat.cs
index 48d8cce..dc52236 100644
--- a/src/Lucene.Net.Core/Support/NumberFormat.cs
+++ b/src/Lucene.Net.Core/Support/NumberFormat.cs
@@ -75,6 +75,11 @@ namespace Lucene.Net.Support
             return decimal.Parse(source, locale);
         }
 
+        public override string ToString()
+        {
+            return base.ToString() + " - " + GetNumberFormat() + " - " + locale.ToString();
+        }
+
         // LUCENENET TODO: Add additional functionality to edit the NumberFormatInfo
         // properties, which provides somewhat similar functionality to the below Java
         // getters and setters.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/58a76127/src/Lucene.Net.QueryParser/Flexible/Standard/Processors/NumericRangeQueryNodeProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Processors/NumericRangeQueryNodeProcessor.cs
b/src/Lucene.Net.QueryParser/Flexible/Standard/Processors/NumericRangeQueryNodeProcessor.cs
index 89dc1ba..2061f75 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Standard/Processors/NumericRangeQueryNodeProcessor.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Processors/NumericRangeQueryNodeProcessor.cs
@@ -92,8 +92,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Processors
                                 {
                                     throw new QueryNodeParseException(new Message(
                                         QueryParserMessages.COULD_NOT_PARSE_NUMBER, lower
-                                            .GetTextAsString(), numberFormat.GetType()
-                                            .AssemblyQualifiedName), e);
+                                            .GetTextAsString(), numberFormat.ToString()),
e);
                                 }
                             }
 
@@ -107,8 +106,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Processors
                                 {
                                     throw new QueryNodeParseException(new Message(
                                         QueryParserMessages.COULD_NOT_PARSE_NUMBER, upper
-                                            .GetTextAsString(), numberFormat.GetType()
-                                            .AssemblyQualifiedName), e);
+                                            .GetTextAsString(), numberFormat.ToString()),
e);
                                 }
                             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/58a76127/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
index 5e05383..b5c1e13 100644
--- a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
+++ b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
@@ -279,6 +279,7 @@
     <EmbeddedResource Include="Flexible\Core\Messages\QueryParserMessagesBundle.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>QueryParserMessagesBundle.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />


Mime
View raw message