944,052 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1060
  • Java RSS
Jun 23rd, 2005
0

help

Expand Post »
hi

does anyone know what this mean?

SWT.error(SWT.ERROR_NULL_ARGUMENT);

is there another virsion of this to write?
Reputation Points: 10
Solved Threads: 1
Posting Whiz
sam1 is offline Offline
300 posts
since Nov 2004
Jun 23rd, 2005
0

Re: help

This is done for error handling

Form ezample

Java Syntax (Toggle Plain Text)
  1. * @exception IllegalArgumentException <ul>
  2. * <li>ERROR_NULL_ARGUMENT - if the stream is null</li>
  3. * </ul>
  4. * @exception SWTException <ul>
  5. * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
  6. * <li>ERROR_IO - if an input/output error occurs while reading data</li>
  7. * </ul>
  8. */
  9. public ImageData[] load(InputStream stream) {
  10. if (stream == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
  11. reset();
  12. data = FileFormat.load(stream, this);
  13. return data;
  14. }

If the stream is null.. etc etc..

It allows comparison..
Reputation Points: 12
Solved Threads: 19
Posting Pro
techniner is offline Offline
521 posts
since May 2005
Jun 23rd, 2005
0

Re: help

so if i had:

public boolean contains (Point pt) {
if (pt == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
return contains(pt.x, pt.y);
}

does it mean if pt == null then it is false else return contains.....?
Reputation Points: 10
Solved Threads: 1
Posting Whiz
sam1 is offline Offline
300 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: java 2d games problem (collision, well prevention)
Next Thread in Java Forum Timeline: java is supposed to be secure?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC