ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Serialization/SearchResultWriter.cs
(Generate patch)

Comparing trunk/RomCheater/Serialization/SearchResultWriter.cs (file contents):
Revision 428 by william, Thu Jun 21 14:38:54 2012 UTC vs.
Revision 429 by william, Tue May 28 15:16:05 2013 UTC

--- trunk/RomCheater/Serialization/SearchResultWriter.cs	2013/05/28 13:32:28	428
+++ trunk/RomCheater/Serialization/SearchResultWriter.cs	2013/05/28 15:16:05	429
@@ -70,13 +70,15 @@ namespace RomCheater.Serialization
         }
 
         protected override void Dispose(bool disposing)
-        {
+        {            
             base.Dispose(disposing);
-            // ensure ResultCount and ResultsWritten are equal
+            // ensure ResultCount and ResultsWritten are equal            
             if (ResultCount != ResultsWritten)
             {
-                throw new InvalidOperationException(string.Format("ResultCount does not match ResultsWritten: 0x{0:x8} != 0x{1:x8}", ResultCount, ResultsWritten));
-            }            
+                string message = string.Format("ResultCount does not match ResultsWritten: 0x{0:x8} != 0x{1:x8} -- offset: 0x{2:x8}", ResultCount, ResultsWritten, ResultCount - ResultsWritten);
+                Logging.logger.Error.WriteLine(message);
+                throw new InvalidOperationException(message);
+            }
         }
     }
 }