Log.error(...) could've taken Throwable
Brought to you by:
cbladon
Currently, the grace.log.Log declares the error(...) methods with Exception. But, Exception doesn't cover everything that can be caught, unlike Throwable. I'd suggest you change the method declaration to Throwable.
Also, EventFormat.java:773 could easily throw the ClassCastException if you use something Throwable, but not Exception, in Log.error(String, Object), if I'm not mistaken.
Also, EventFormat.format* could use a dispatcher pattern and handlers for some specific classes of objects:
getHandlerByClass(object.getClass()).handle(object);
;)
Agreed. The use of Exception instead of Throwable is historical but I can't come up with a good reason why it is there and why not to change it. :)
I'll make the change ASAP.