IllegalArgumentException

Summary

Represents an illegal argument exception.

Description

Represents an illegal argument exception.

This can be used together with the external type. Since external is not guaranteed to be statically-typed, invalid arguments may be supplied at runtime.

Examples

Basic Usage
1
2
3
4
5
6
7
8
9
10
import System;
import System.Exceptions;
 
function foo(s) {
    if (typeof s != "string") {
        throw new IllegalArgumentException(
            "Expected a 'string' argument."
        );
    }
}

Methods

Share

HTML | BBCode | Direct Link