Switching from printStackTrace to UnhandledException as per LANG-450

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@688011 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2008-08-22 07:49:28 +00:00
parent 2d575a7359
commit 8b718d2470
1 changed files with 8 additions and 16 deletions

View File

@ -162,8 +162,7 @@ public class StringEscapeUtils {
return writer.toString();
} catch (IOException ioe) {
// this should never ever happen while writing to a StringWriter
ioe.printStackTrace();
return null;
throw new UnhandledException(ioe);
}
}
@ -286,8 +285,7 @@ public class StringEscapeUtils {
return writer.toString();
} catch (IOException ioe) {
// this should never ever happen while writing to a StringWriter
ioe.printStackTrace();
return null;
throw new UnhandledException(ioe);
}
}
@ -461,11 +459,9 @@ public class StringEscapeUtils {
StringWriter writer = new StringWriter ((int)(str.length() * 1.5));
escapeHtml(writer, str);
return writer.toString();
} catch (IOException e) {
//assert false;
} catch (IOException ioe) {
//should be impossible
e.printStackTrace();
return null;
throw new UnhandledException(ioe);
}
}
@ -533,11 +529,9 @@ public class StringEscapeUtils {
StringWriter writer = new StringWriter ((int)(str.length() * 1.5));
unescapeHtml(writer, str);
return writer.toString();
} catch (IOException e) {
//assert false;
} catch (IOException ioe) {
//should be impossible
e.printStackTrace();
return null;
throw new UnhandledException(ioe);
}
}
@ -733,8 +727,7 @@ public class StringEscapeUtils {
return writer.toString();
} catch (IOException ioe) {
// this should never ever happen while writing to a StringWriter
ioe.printStackTrace();
return null;
throw new UnhandledException(ioe);
}
}
@ -811,8 +804,7 @@ public class StringEscapeUtils {
return writer.toString();
} catch (IOException ioe) {
// this should never ever happen while writing to a StringWriter
ioe.printStackTrace();
return null;
throw new UnhandledException(ioe);
}
}