|
30 | 30 | import com.laytonsmith.core.events.EventUtils;
|
31 | 31 | import com.laytonsmith.core.exceptions.CRE.CREBindException;
|
32 | 32 | import com.laytonsmith.core.exceptions.CRE.CRECastException;
|
| 33 | +import com.laytonsmith.core.exceptions.CRE.CREIllegalArgumentException; |
33 | 34 | import com.laytonsmith.core.exceptions.CRE.CREInsufficientArgumentsException;
|
34 | 35 | import com.laytonsmith.core.exceptions.CRE.CREThrowable;
|
35 | 36 | import com.laytonsmith.core.exceptions.ConfigCompileException;
|
36 | 37 | import com.laytonsmith.core.exceptions.ConfigRuntimeException;
|
37 | 38 | import com.laytonsmith.core.exceptions.EventException;
|
| 39 | + |
| 40 | +import java.net.BindException; |
38 | 41 | import java.util.ArrayList;
|
39 | 42 | import java.util.EnumSet;
|
40 | 43 | import java.util.List;
|
@@ -456,17 +459,22 @@ public Integer[] numArgs() {
|
456 | 459 |
|
457 | 460 | @Override
|
458 | 461 | public String docs() {
|
459 |
| - return "void {eventName, eventObject, [serverWide]} Manually triggers bound events. The event object passed to this function is " |
460 |
| - + " sent directly as-is to the bound events. Check the documentation for each event to see what is required." |
461 |
| - + " No checks will be done on the data here, but it is not recommended to fail to send all parameters required." |
462 |
| - + " If serverWide is true, the event is triggered directly in the server, unless it is a CommandHelper specific" |
463 |
| - + " event, in which case, serverWide is irrelevant. Defaults to false, which means that only CommandHelper code" |
464 |
| - + " will receive the event."; |
| 462 | + return "void {eventName, eventObject, [serverWide]} Manually triggers bound events." |
| 463 | + + " The event object passed to this function is sent directly as-is to the bound events." |
| 464 | + + " Check the documentation for each event to see what is required." |
| 465 | + + " No checks will be done on the data here," |
| 466 | + + " but it is not recommended to fail to send all parameters required." |
| 467 | + + " If serverWide is true, the event is triggered directly in the server," |
| 468 | + + " unless it is a CommandHelper specific event, in which case, serverWide is irrelevant." |
| 469 | + + " Defaults to false, which means that only CommandHelper code will receive the event." |
| 470 | + + " Throws a CastException when eventObject is not an array and not null." |
| 471 | + + " Throws a BindException when " + getName() + "() is not yet supported by the given event." |
| 472 | + + " Throws a CREIllegalArgumentException exception, if the event does not exist."; |
465 | 473 | }
|
466 | 474 |
|
467 | 475 | @Override
|
468 | 476 | public Class<? extends CREThrowable>[] thrown() {
|
469 |
| - return new Class[]{CRECastException.class}; |
| 477 | + return new Class[]{CRECastException.class, BindException.class, CREIllegalArgumentException.class}; |
470 | 478 | }
|
471 | 479 |
|
472 | 480 | @Override
|
|
0 commit comments