give some debug message regarding why export has failed

To test:

1) create a problem
2) muck with the XML to make it invalid
3) go export it
4) should see error notification with some debugging information

@talbs can you look from a UI side. I reused existing components (I hope). @dmitchell can you review back-end code? Not sure how to unit test since this is a hook into the UI.