You can print stack traces like was described here http://stackoverflow.com/a/18873979