avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [avro] branch master updated: AVRO-2329: Set inner exception when available
Date Fri, 01 Mar 2019 20:45:04 GMT
This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new a561088  AVRO-2329: Set inner exception when available
a561088 is described below

commit a56108835a0aa35530c8f367ce8a50d0c5861192
Author: Brian Lachniet <blachniet@gmail.com>
AuthorDate: Thu Feb 28 20:04:03 2019 -0500

    AVRO-2329: Set inner exception when available
---
 lang/csharp/src/apache/main/File/DataFileReader.cs     | 6 +++---
 lang/csharp/src/apache/main/Generic/GenericReader.cs   | 2 +-
 lang/csharp/src/apache/main/Generic/GenericWriter.cs   | 2 +-
 lang/csharp/src/apache/main/Specific/SpecificReader.cs | 2 +-
 lang/csharp/src/apache/main/Specific/SpecificWriter.cs | 4 ++--
 lang/csharp/src/apache/test/Schema/SchemaTests.cs      | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lang/csharp/src/apache/main/File/DataFileReader.cs b/lang/csharp/src/apache/main/File/DataFileReader.cs
index 0e81d9f..ceb358f 100644
--- a/lang/csharp/src/apache/main/File/DataFileReader.cs
+++ b/lang/csharp/src/apache/main/File/DataFileReader.cs
@@ -1,4 +1,4 @@
-/**
+/**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -418,8 +418,8 @@ namespace Avro.File
             }
             catch (Exception e)
             {
-                throw new AvroRuntimeException(string.Format("Error ascertaining if data
has next block: {0}", e));
+                throw new AvroRuntimeException(string.Format("Error ascertaining if data
has next block: {0}", e), e);
             }
         }
     }
-}
\ No newline at end of file
+}
diff --git a/lang/csharp/src/apache/main/Generic/GenericReader.cs b/lang/csharp/src/apache/main/Generic/GenericReader.cs
index 35bbaaf..4c23826 100644
--- a/lang/csharp/src/apache/main/Generic/GenericReader.cs
+++ b/lang/csharp/src/apache/main/Generic/GenericReader.cs
@@ -249,7 +249,7 @@ namespace Avro.Generic
                 }
                 catch (Exception ex)
                 {
-                    throw new AvroException(ex.Message + " in field " + wf.Name);
+                    throw new AvroException(ex.Message + " in field " + wf.Name, ex);
                 }
             }
 
diff --git a/lang/csharp/src/apache/main/Generic/GenericWriter.cs b/lang/csharp/src/apache/main/Generic/GenericWriter.cs
index 6764a58..f650cb7 100644
--- a/lang/csharp/src/apache/main/Generic/GenericWriter.cs
+++ b/lang/csharp/src/apache/main/Generic/GenericWriter.cs
@@ -181,7 +181,7 @@ namespace Avro.Generic
                 }
                 catch (Exception ex)
                 {
-                    throw new AvroException(ex.Message + " in field " + field.Name);
+                    throw new AvroException(ex.Message + " in field " + field.Name, ex);
                 }
             }
         }
diff --git a/lang/csharp/src/apache/main/Specific/SpecificReader.cs b/lang/csharp/src/apache/main/Specific/SpecificReader.cs
index cc8c594..f28450c 100644
--- a/lang/csharp/src/apache/main/Specific/SpecificReader.cs
+++ b/lang/csharp/src/apache/main/Specific/SpecificReader.cs
@@ -121,7 +121,7 @@ namespace Avro.Specific
                 }
                 catch (Exception ex)
                 {
-                    throw new AvroException(ex.Message + " in field " + wf.Name);
+                    throw new AvroException(ex.Message + " in field " + wf.Name, ex);
                 }
             }
 
diff --git a/lang/csharp/src/apache/main/Specific/SpecificWriter.cs b/lang/csharp/src/apache/main/Specific/SpecificWriter.cs
index f2573a0..993f144 100644
--- a/lang/csharp/src/apache/main/Specific/SpecificWriter.cs
+++ b/lang/csharp/src/apache/main/Specific/SpecificWriter.cs
@@ -1,4 +1,4 @@
-/**
+/**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -67,7 +67,7 @@ namespace Avro.Specific
                 }
                 catch (Exception ex)
                 {
-                    throw new AvroException(ex.Message + " in field " + field.Name);
+                    throw new AvroException(ex.Message + " in field " + field.Name, ex);
                 }
             }
         }
diff --git a/lang/csharp/src/apache/test/Schema/SchemaTests.cs b/lang/csharp/src/apache/test/Schema/SchemaTests.cs
index 41db0a2..72f27fd 100644
--- a/lang/csharp/src/apache/test/Schema/SchemaTests.cs
+++ b/lang/csharp/src/apache/test/Schema/SchemaTests.cs
@@ -159,7 +159,7 @@ namespace Avro.Test
             }
             catch (Exception e)
             {
-                throw new AvroException(e.ToString() + ": " + sc.ToString());
+                throw new AvroException(e.ToString() + ": " + sc.ToString(), e);
             }
         }
 


Mime
View raw message