[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [platform-team-dev] Set Message.
|
How
about when status is not multistatus.
if
(!status.isMultiStatus())
Of course you
can set the message of a Status at runtime. However, it can only be set when
the status object is created. Once a ststus has been created the message
cannot be changed. If you think about it, this makes sense. Why do you want to
set the message of an IStatus? Typically what is done when catching errors and
propogating them to a client is that the status is added as a child of a
MultiStatus. You could do somthing like this.
IStatus status = peformAction();
if (!status.isOk()) {
MultiStatus result = new MultiStatus(MyPlugin.ID,
MyConstants.ERROR_CODE, "My error message", null);
result.add(status);
return result;
}
Michael
"Kadadi, Usha D"
<Usha.Kadadi@xxxxxx> Sent by: platform-team-dev-admin@xxxxxxxxxxx
10/08/2004 10:11 AM
Please respond
to platform-team-dev |
|
To
| <platform-team-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
| RE:
[platform-team-dev] Set Message. |
|
Can we not set it at runtime.
-----Original Message-----
From:
platform-team-dev-admin@xxxxxxxxxxx
[mailto:platform-team-dev-admin@xxxxxxxxxxx]On Behalf Of Michael
Valenta
Sent: Tuesday, August 10, 2004 7:00 AM
To:
platform-team-dev@xxxxxxxxxxx
Subject: Re: [platform-team-dev] Set
Message.
You can only set the
message when creating an instance of IStatus (see org.eclipse.runtime.Status
and org.eclipse.runtime.MultiStatus).
Michael
"Kadadi, Usha D"
<Usha.Kadadi@xxxxxx> Sent by:
platform-team-dev-admin@xxxxxxxxxxx
10/08/2004 09:20 AM
Please respond
to platform-team-dev |
|
To
| <platform-team-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
| [platform-team-dev]
Set Message. |
|
In Eclipse 2.0.2
and 2.1.2 how can i set the message of IStatus object.