Handle the exception and do something in that case. For example :
try{
UUID uuid = UUID.fromString(someUUID);
//do something
} catch (IllegalArgumentException exception){
//handle the case where string is not valid UUID
}
Handle the exception and do something in that case. For example :
try{
UUID uuid = UUID.fromString(someUUID);
//do something
} catch (IllegalArgumentException exception){
//handle the case where string is not valid UUID
}