log errors into framework.log
more error handling
use kind_of? for checking exceptions
Land #4473 - Log backtraces by default