Community
Participate
Working Groups
I20021127 Sometime the error dialogs (org.eclipse.jface.dialogs.ErrorDialog) show up like Reason: null This is because the error dialog adds the message contained in the status without checking for null. I suggest to test for null and if it is null and the status has an exception then use status.getException().toString(); I agree that seeing an exception class name e.g. CharEncodingException is bad - but I prefer it a 100 times over seeing null (or nothing except "Error") in the UI.
It is not possible within the API for Status to create one with a null value (see Status setMessage() which does an assert check for null). The real issue here is that it is possible to create a Status with a method of null - where did this happen?
JavaModelStatus.getMessage returns null. Seems that this violates the API spec.
Marking as Worksforme as you cannot have a status with a null message.
Reopening and moving to JCore: Platform UI correctly claims that null message is illegal according to API of IStatus.getMessage
Pls investigate.
Made change suggested by Dani.
Verified.