throw new NoSuchAlgorithmException(msg);
if (lastException != null) throw lastException; throw new NoSuchAlgorithmException(mechanism);
  public static final ExemptionMechanism getInstance(String mechanism)  throws NoSuchAlgorithmException  {    Provider[] provs = Security.getProviders();    String msg = "";    for (int i = 0; i < provs.length; i++)      {        try          {            return getInstance(mechanism, provs[i]);          }        catch (NoSuchAlgorithmException nsae)          {            msg = nsae.getMessage();          }      }    throw new NoSuchAlgorithmException(msg);  }