22
33import edu .wpi .grip .core .util .ExceptionWitness ;
44
5+ import javax .annotation .Nullable ;
56import java .util .Optional ;
67
78import static com .google .common .base .Preconditions .checkNotNull ;
@@ -22,9 +23,9 @@ public final class ExceptionEvent {
2223 * @param message The message associated with this event.
2324 * If <tt>null</tt> will use {@link Exception#getMessage()}
2425 */
25- public ExceptionEvent (Object origin , Exception exception , String message ) {
26+ public ExceptionEvent (Object origin , Exception exception , @ Nullable String message ) {
2627 this .exception = Optional .of (exception );
27- this .origin = checkNotNull (origin , "The origin can not be null" );
28+ this .origin = checkNotNull (origin , "The origin cannot be null" );
2829 this .message = message != null ? message : exception .getMessage ();
2930 }
3031
@@ -33,9 +34,9 @@ public ExceptionEvent(Object origin, Exception exception, String message) {
3334 * @param message The message associated with this event.
3435 */
3536 public ExceptionEvent (Object origin , String message ) {
36- this .origin = checkNotNull (origin , "The origin can not be null" );
37+ this .origin = checkNotNull (origin , "The origin cannot be null" );
3738 this .exception = Optional .empty ();
38- this .message = message ;
39+ this .message = checkNotNull ( message , "The message cannot be null" ) ;
3940 }
4041
4142 /**
0 commit comments