Bug 9426 - [PATCH] New Exception - IllegalPropertySetDataException
Summary: [PATCH] New Exception - IllegalPropertySetDataException
Status: CLOSED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HPSF (show other bugs)
Version: 2.0-dev
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-26 19:13 UTC by Drew Varner
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Diffs on Property.java to add IllegalPropertySetDataException (1.33 KB, patch)
2002-05-26 19:14 UTC, Drew Varner
Details | Diff
new class, IllegalPropertySetDataException (2.76 KB, application/octet-stream)
2002-05-26 19:14 UTC, Drew Varner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Drew Varner 2002-05-26 19:13:53 UTC
This patch adds a new exception, IllegalPropertySetDataException. Use this when 
an illegal value shows up in a PropertySet. Per Andy's recommendations in 
comments.

cvs diff -u

*****CVS exited normally with code 1*****

? IllegalPropertySetDataException.java
cvs server: Diffing .
Index: Property.java
===================================================================
RCS file: /home/cvspublic/jakarta-
poi/src/java/org/apache/poi/hpsf/Property.java,v
retrieving revision 1.6
diff -u -r1.6 Property.java
--- Property.java	11 May 2002 14:47:23 -0000	1.6
+++ Property.java	26 May 2002 19:10:19 -0000
@@ -63,7 +63,7 @@
 package org.apache.poi.hpsf;
 
 import java.util.*;
-import org.apache.poi.util.LittleEndian; 
+import org.apache.poi.util.LittleEndian;
 
 /**
  *  <p>
@@ -257,13 +257,7 @@
                 } else if (bool == 0) {
                     value = new Boolean(false);
                 } else {
-                    /*
-                     *  FIXME: Someone might invent a new
-                     *  HPSFRuntimeException subclass
-                     *  IllegalPropertySetDataException for this and
-                     *  similar cases.
-                     */
-                    throw new HPSFRuntimeException
+                    throw new IllegalPropertySetDataException
                             ("Illegal property set data: A boolean must be " +
                             "either -1 (true) or 0 (false).");
                 }
cvs server: Diffing wellknown
Comment 1 Drew Varner 2002-05-26 19:14:40 UTC
Created attachment 1948 [details]
Diffs on Property.java to add IllegalPropertySetDataException
Comment 2 Drew Varner 2002-05-26 19:14:59 UTC
Created attachment 1949 [details]
new class, IllegalPropertySetDataException
Comment 3 Andy Oliver 2002-05-26 22:19:24 UTC
applied, drew please cross check.  (also please start making sure you add
yourself in teh @author tags)
Comment 4 Andy Oliver 2002-05-26 22:20:47 UTC
applied, drew please cross check.  (also please start making sure you add
yourself in teh @author tags)