ArgumentException.hx 448 B

12345678910111213141516
  1. package haxe.exceptions;
  2. /**
  3. An exception that is thrown when an invalid value provided for an argument of a function.
  4. **/
  5. class ArgumentException extends PosException {
  6. /**
  7. An argument name.
  8. **/
  9. public final argument:String;
  10. public function new(argument:String, ?message:String, ?previous:Exception, ?pos:PosInfos):Void {
  11. super(message == null ? 'Invalid argument "$argument"' : message, previous, pos);
  12. this.argument = argument;
  13. }
  14. }