help

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2004
Posts: 259
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

help

 
0
  #1
Jun 23rd, 2005
hi

does anyone know what this mean?

SWT.error(SWT.ERROR_NULL_ARGUMENT);

is there another virsion of this to write?
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 514
Reputation: techniner is an unknown quantity at this point 
Solved Threads: 19
techniner techniner is offline Offline
Posting Pro

Re: help

 
0
  #2
Jun 23rd, 2005
This is done for error handling

Form ezample

  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..
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 259
Reputation: sam1 is an unknown quantity at this point 
Solved Threads: 1
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: help

 
0
  #3
Jun 23rd, 2005
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.....?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC