mirror of https://github.com/apache/poi.git
[bug-65260] catch Throwable instead of error - see https://github.com/apache/poi/pull/425
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907308 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
34f6955a28
commit
040181c42f
|
@ -63,7 +63,7 @@ public class SXSSFSheet implements Sheet, OoxmlSheetExtensions {
|
|||
setRandomAccessWindowSize(randomAccessWindowSize);
|
||||
try {
|
||||
_autoSizeColumnTracker = new AutoSizeColumnTracker(this);
|
||||
} catch (InternalError e) {
|
||||
} catch (Throwable t) {
|
||||
LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", e);
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class SXSSFSheet implements Sheet, OoxmlSheetExtensions {
|
|||
setRandomAccessWindowSize(_workbook.getRandomAccessWindowSize());
|
||||
try {
|
||||
_autoSizeColumnTracker = new AutoSizeColumnTracker(this);
|
||||
} catch (InternalError e) {
|
||||
} catch (Throwable e) {
|
||||
LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -300,12 +300,12 @@ public class SheetUtil {
|
|||
try {
|
||||
TextLayout layout = new TextLayout(str.getIterator(), fontRenderContext);
|
||||
return (int) layout.getAdvance();
|
||||
} catch (UnsatisfiedLinkError | NoClassDefFoundError | InternalError e) {
|
||||
} catch (Throwable t) {
|
||||
if (ignoreMissingFontSystem) {
|
||||
return DEFAULT_CHAR_WIDTH;
|
||||
}
|
||||
|
||||
throw e;
|
||||
throw t;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue