Closed jswiderski closed 9 years ago
Fixed or partially Fixed with 9c175c0.
We are no longer catching Exception (what is a bad practice). We are no longer throwing exceptions from finally block because they could swallow exceptions thrown in catch block (another bad practice). Instead we are logging exceptions that we catch. I'm not sure how previous code got there in the first place.
I'm still thinking about solution for CKEditorconfig.
Furtner fixes with 58512b8
I have made some research and I really liked the solution mentioned here http://stackoverflow.com/a/1274822. Returning empty configuration object instead of null as it avoids further ifs.
About catching exception and returning null - it is debatable whether this is a bad practice or not. It depends on particular use case however in this one returning empty configuration object makes more sense.
Another link: https://today.java.net/article/2006/04/04/exception-handling-antipatterns
Classes: CKEditorconfig, CKEditorInsertTag and CKEditorTag all throw exceptions. We should add a logger there.