Bug 394205 - [Xtend/Xpand IDE Integration] Create an entry in Error Log when transaction in CheckJob fails
Summary: [Xtend/Xpand IDE Integration] Create an entry in Error Log when transaction i...
Status: CLOSED WONTFIX
Alias: None
Product: Sphinx
Classification: Automotive
Component: M2x IDE Integration (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-13 11:59 EST by Romain Sezestre CLA
Modified: 2024-05-06 23:10 EDT (History)
7 users (show)

See Also:


Attachments
Correction proposal (3.37 KB, patch)
2012-11-13 12:11 EST, Romain Sezestre CLA
idydieng: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Romain Sezestre CLA 2012-11-13 11:59:07 EST
In org.eclipse.sphinx.xtendxpand.jobs.CheckJob, evaluation requests are executed within a read transaction on the editing domain. When an error occurs during execution of this transaction, an error status is creating and returned:

  try {
      ...

          editingDomain.runExclusive(runnable);

      ...
  } catch (Exception ex) {
      return StatusUtil.createErrorStatus(Activator.getPlugin(), ex);
  }

In org.eclipse.sphinx.xtendxpand.jobs.M2TJob, where CheckJob requested for running, the result status is got; and an OperationCanceledException is thrown when severity of status is ERROR. This exception is directly caught and a CANCEL_STATUS is returned by runInWorkspace.

The problem is that once CANCEL_STATUS is returned, we have lost error (and associated message) that previously occurred during execution of read transaction and there is more possibility for logging any entry in Error Log.
Comment 1 Romain Sezestre CLA 2012-11-13 12:04:36 EST
I guess similar behavior can be observed with XpandJob and XtendJob.
Comment 2 Romain Sezestre CLA 2012-11-13 12:11:50 EST
Created attachment 223522 [details]
Correction proposal

Attached patch suggests to add an entry in Error Log thanks to PlatformLogUtil in CheckJob, XpandJob and XtendJob.

If there is any other way to fix this trouble, please let me know.
Comment 3 Balazs Grill CLA 2024-05-06 23:10:58 EDT
Closed stale issue before migration