How to handle exceptions within FileEditorProvider.createEditor()

My file editor provider loads the editable content from a database, content which may not always be available.
In bad cases a SQLException is thrown which I can catch and display a proper message.. but what should the method createEditor(...) return in this a case? I don't need the editor to be created any more at this stage.

Moving the loading mechanism in the accept(...) method is not really an option..
e.g. for loading an editable ResultSet I need to do two requests to database, or to cache the result between the calls on accept(...) and createEditor(...)

Would be nice to be able to define an exception which is intercepted and leniently handled somewhere in the call trace of createEditor(...) method.

Any idea how I can solve this? Appreciate any hint.

Please sign in to leave a comment.