diff options
author | PJ Fanning <fanningpj@apache.org> | 2023-02-14 13:51:52 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2023-02-14 13:51:52 +0000 |
commit | adcf7bf53301a9ba1abe7ce67c73e256a4260844 (patch) | |
tree | 0dae163b9c553f931841e0a47f05a417489263b2 /poi-examples | |
parent | 660b90062ded807bd4bf50cb419457baa1acc595 (diff) | |
download | poi-adcf7bf53301a9ba1abe7ce67c73e256a4260844.tar.gz poi-adcf7bf53301a9ba1abe7ce67c73e256a4260844.zip |
add util code to rethrow fatal exceptions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907645 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples')
-rw-r--r-- | poi-examples/src/main/java/org/apache/poi/examples/hpsf/ReadCustomPropertySets.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/ReadCustomPropertySets.java b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/ReadCustomPropertySets.java index ca8cba1ce9..187f434b94 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hpsf/ReadCustomPropertySets.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hpsf/ReadCustomPropertySets.java @@ -29,6 +29,7 @@ import org.apache.poi.hpsf.PropertySetFactory; import org.apache.poi.hpsf.Section; import org.apache.poi.poifs.eventfilesystem.POIFSReader; import org.apache.poi.poifs.eventfilesystem.POIFSReaderEvent; +import org.apache.poi.util.ExceptionUtil; /** * <p>Sample application showing how to read a document's custom property set. @@ -66,6 +67,9 @@ public final class ReadCustomPropertySets { out("No property set stream: \"" + streamName + "\""); return; } catch (Exception ex) { + if (ExceptionUtil.isFatal(ex)) { + ExceptionUtil.rethrow(ex); + } throw new HPSFRuntimeException("Property set stream \"" + streamName + "\": " + ex); } |