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
f20d43c9b3
commit
4aea586fe5
@ -111,7 +111,7 @@ public class BiffViewer {
|
|||||||
}
|
}
|
||||||
activeRecord.dump();
|
activeRecord.dump();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RecordFormatException("Error reading bytes");
|
throw new RecordFormatException("Error reading bytes", e);
|
||||||
}
|
}
|
||||||
Record[] retval = new Record[records.size()];
|
Record[] retval = new Record[records.size()];
|
||||||
|
|
||||||
|
@ -332,9 +332,7 @@ public class EventRecordFactory
|
|||||||
}
|
}
|
||||||
catch (Exception introspectionException)
|
catch (Exception introspectionException)
|
||||||
{
|
{
|
||||||
introspectionException.printStackTrace();
|
throw new RecordFormatException("Unable to construct record instance" , introspectionException);
|
||||||
throw new RecordFormatException(
|
|
||||||
"Unable to construct record instance, the following exception occured: " + introspectionException.getMessage());
|
|
||||||
}
|
}
|
||||||
if (retval instanceof RKRecord)
|
if (retval instanceof RKRecord)
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ public class FormulaRecord
|
|||||||
field_7_expression_len = in.readShort();
|
field_7_expression_len = in.readShort();
|
||||||
field_8_parsed_expr = Ptg.createParsedExpressionTokens(field_7_expression_len, in);
|
field_8_parsed_expr = Ptg.createParsedExpressionTokens(field_7_expression_len, in);
|
||||||
} catch (java.lang.UnsupportedOperationException uoe) {
|
} catch (java.lang.UnsupportedOperationException uoe) {
|
||||||
throw new RecordFormatException(uoe.toString());
|
throw new RecordFormatException(uoe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,9 +222,7 @@ public class RecordFactory
|
|||||||
}
|
}
|
||||||
catch (Exception introspectionException)
|
catch (Exception introspectionException)
|
||||||
{
|
{
|
||||||
introspectionException.printStackTrace();
|
throw new RecordFormatException("Unable to construct record instance",introspectionException);
|
||||||
throw new RecordFormatException(
|
|
||||||
"Unable to construct record instance, the following exception occured: " + introspectionException.getMessage());
|
|
||||||
}
|
}
|
||||||
if (retval instanceof RKRecord)
|
if (retval instanceof RKRecord)
|
||||||
{
|
{
|
||||||
@ -316,9 +314,8 @@ public class RecordFactory
|
|||||||
}
|
}
|
||||||
catch (Exception illegalArgumentException)
|
catch (Exception illegalArgumentException)
|
||||||
{
|
{
|
||||||
illegalArgumentException.printStackTrace();
|
|
||||||
throw new RecordFormatException(
|
throw new RecordFormatException(
|
||||||
"Unable to determine record types");
|
"Unable to determine record types", illegalArgumentException);
|
||||||
}
|
}
|
||||||
result.put(new Short(sid), constructor);
|
result.put(new Short(sid), constructor);
|
||||||
}
|
}
|
||||||
|
@ -30,4 +30,12 @@ public class RecordFormatException
|
|||||||
{
|
{
|
||||||
super(exception);
|
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
|
//Dont increment the pos just yet (technically we are at the start of
|
||||||
//the record stream until nextRecord is called).
|
//the record stream until nextRecord is called).
|
||||||
} catch (IOException ex) {
|
} 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 :
|
default :
|
||||||
|
|
||||||
//retval = new UnknownPtg();
|
//retval = new UnknownPtg();
|
||||||
throw new java.lang.UnsupportedOperationException(
|
throw new java.lang.UnsupportedOperationException(" Unknown Ptg in Formula: 0x"+
|
||||||
Integer.toHexString(( int ) id) + " (" + ( int ) id + ")");
|
Integer.toHexString(( int ) id) + " (" + ( int ) id + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user