mirror of https://github.com/apache/poi.git
Exception Chaining: Added support for java 1.4 style exception chaining. Believe that POI is targeted at 1.4 nowdays so this should not cause an issue.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@425026 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b00b858ade
commit
0d2f7ed7bd
src/java/org/apache/poi/hssf
|
@ -111,7 +111,7 @@ public class BiffViewer {
|
|||
}
|
||||
activeRecord.dump();
|
||||
} catch (IOException e) {
|
||||
throw new RecordFormatException("Error reading bytes");
|
||||
throw new RecordFormatException("Error reading bytes", e);
|
||||
}
|
||||
Record[] retval = new Record[records.size()];
|
||||
|
||||
|
|
|
@ -332,9 +332,7 @@ public class EventRecordFactory
|
|||
}
|
||||
catch (Exception introspectionException)
|
||||
{
|
||||
introspectionException.printStackTrace();
|
||||
throw new RecordFormatException(
|
||||
"Unable to construct record instance, the following exception occured: " + introspectionException.getMessage());
|
||||
throw new RecordFormatException("Unable to construct record instance" , introspectionException);
|
||||
}
|
||||
if (retval instanceof RKRecord)
|
||||
{
|
||||
|
|
|
@ -102,7 +102,7 @@ public class FormulaRecord
|
|||
field_7_expression_len = in.readShort();
|
||||
field_8_parsed_expr = Ptg.createParsedExpressionTokens(field_7_expression_len, in);
|
||||
} catch (java.lang.UnsupportedOperationException uoe) {
|
||||
throw new RecordFormatException(uoe.toString());
|
||||
throw new RecordFormatException(uoe);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -222,9 +222,7 @@ public class RecordFactory
|
|||
}
|
||||
catch (Exception introspectionException)
|
||||
{
|
||||
introspectionException.printStackTrace();
|
||||
throw new RecordFormatException(
|
||||
"Unable to construct record instance, the following exception occured: " + introspectionException.getMessage());
|
||||
throw new RecordFormatException("Unable to construct record instance",introspectionException);
|
||||
}
|
||||
if (retval instanceof RKRecord)
|
||||
{
|
||||
|
@ -316,9 +314,8 @@ public class RecordFactory
|
|||
}
|
||||
catch (Exception illegalArgumentException)
|
||||
{
|
||||
illegalArgumentException.printStackTrace();
|
||||
throw new RecordFormatException(
|
||||
"Unable to determine record types");
|
||||
"Unable to determine record types", illegalArgumentException);
|
||||
}
|
||||
result.put(new Short(sid), constructor);
|
||||
}
|
||||
|
|
|
@ -30,4 +30,12 @@ public class RecordFormatException
|
|||
{
|
||||
super(exception);
|
||||
}
|
||||
|
||||
public RecordFormatException(String exception, Throwable thr) {
|
||||
super(exception, thr);
|
||||
}
|
||||
|
||||
public RecordFormatException(Throwable thr) {
|
||||
super(thr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public class RecordInputStream extends InputStream
|
|||
//Dont increment the pos just yet (technically we are at the start of
|
||||
//the record stream until nextRecord is called).
|
||||
} catch (IOException ex) {
|
||||
throw new RecordFormatException("Error reading bytes");
|
||||
throw new RecordFormatException("Error reading bytes", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ public abstract class Ptg
|
|||
default :
|
||||
|
||||
//retval = new UnknownPtg();
|
||||
throw new java.lang.UnsupportedOperationException(
|
||||
throw new java.lang.UnsupportedOperationException(" Unknown Ptg in Formula: 0x"+
|
||||
Integer.toHexString(( int ) id) + " (" + ( int ) id + ")");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue