how to inject the current project reference into ErrorReportSubmitter subclass ?

hello,
is there a way to retrieve an active project reference within an ErrorReportSubmitter subclass ?
Or the only way to get a hold of it inside an error submitter is to pass it within a custom exception wrapper ?
I'm trying to wrap the code responsible for sending an email in a background task with progress indicator and need this reference - as it is a parameter of all Task.Backgroundable class' constructors.
The problem is that I sometimes fail to wrap the incoming RuntimeException and the report submitter receives a plain - vanilla RE - obviously without additional 'context' containing current project reference.
Any thoughts on how to cope with that ?
thanks in advance,
regards
Simon

[EDIT] or maybe there is a spot in IDEA's core where I could plug-in and intercept all incoming RuntimeExceptions and  'decorate' them with the current project reference ?

1 comment

solved

    DataContext dataContext = DataManager.getInstance().getDataContext(parentComponent);
    Project project = PlatformDataKeys.PROJECT.getData(dataContext);

(parentComponent in a parameter of ErrorReportSubmitter's 'submit' method)

0

Please sign in to leave a comment.