26 lines
596 B
Java
26 lines
596 B
Java
package de.hsadmin.cliClientConnector;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@SuppressWarnings("serial")
|
|
public class OidsNotFoundException
|
|
extends RuntimeException
|
|
{
|
|
static private String oidsAsString(List<String> oids)
|
|
{
|
|
StringBuilder oidsBuilder = new StringBuilder();
|
|
for ( String id: oids )
|
|
oidsBuilder.append(", " + id);
|
|
if ( oidsBuilder.length() > 0 )
|
|
return oidsBuilder.substring(2);
|
|
throw new RuntimeException( "an empty list of missing OIDS does not make sense" );
|
|
}
|
|
|
|
public OidsNotFoundException(List<String> oids)
|
|
{
|
|
super("OIDS not found: " + oidsAsString(oids));
|
|
}
|
|
|
|
}
|