Following the example (based on a similar question):
/**
*
*/
package za.co.sindi.jsf.functions;
import java.io.IOException;
import org.markdown4j.Markdown4jProcessor;
/**
*
* @author Buhake Sindi
* @since 22 January 2013
*
*/
public final class SomeFunctions {
/**
* Private constructor
*/
private SomeFunctions() {
//TODO: Nothing...
}
public static String process(String input) {
SomeProcessor processor = new SomeProcessor();
try {
return processor.process(input);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace(); //I don't believe this is correct.
}
}
}
What do I do inside the catch
block? Do I just log it on a java Logger
or is there a preferred JSF way on encapsulating an Exception?