org.itsallcode.junit.sysextensions.security.ExitTrapException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit5-system-extensions Show documentation
Show all versions of junit5-system-extensions Show documentation
These extensions help testing behavior that is related to `System.x` calls like `exit(int).
package org.itsallcode.junit.sysextensions.security;
/*-
* #%L
* JUnit5 System Extensions
* %%
* Copyright (C) 2018 itsallcode.org
* %%
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at
*
* http://www.eclipse.org/legal/epl-v20.html
* #L%
*/
public class ExitTrapException extends SecurityException
{
private static final long serialVersionUID = 3483205912039194022L;
/** @serial */
private final int status;
public ExitTrapException(final String message, final int status)
{
super(message);
this.status = status;
}
public int getExitStatus()
{
return this.status;
}
}