hi
does anyone know what this mean?
SWT.error(SWT.ERROR_NULL_ARGUMENT);
is there another virsion of this to write?
This is done for error handling
Form ezample
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the stream is null</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
* <li>ERROR_IO - if an input/output error occurs while reading data</li>
* </ul>
*/
public ImageData[] load(InputStream stream) {
if (stream == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
reset();
data = FileFormat.load(stream, this);
return data;
}
If the stream is null.. etc etc..
It allows comparison..
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.....?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.