private FragmentNotFoundException createFragmentNotFoundException( FermatFragmentsEnumType fragments) { String possibleReason = (fragments == null) ? "The parameter 'fragments' is NULL" : "Not found in switch block"; String context = (fragments == null) ? "Null Value" : fragments.toString(); return new FragmentNotFoundException( "Fragment not found", new Exception(), context, possibleReason); }
private FragmentNotFoundException createFragmentNotFoundException( FermatFragmentsEnumType fragments) { String possibleReason, context; if (fragments == null) { possibleReason = "The parameter 'fragments' is NULL"; context = "Null Value"; } else { possibleReason = "Not found in switch block"; context = fragments.toString(); } return new FragmentNotFoundException( "Fragment not found", new Exception(), context, possibleReason); }