Package sop.exception

Class SOPGPException.UnsupportedProfile

All Implemented Interfaces:
Serializable
Enclosing class:
SOPGPException

public static class SOPGPException.UnsupportedProfile extends SOPGPException
The user provided a subcommand with an unsupported profile ("--profile=XYZ"), or the user tried to list profiles of a subcommand that does not support profiles at all.
See Also:
  • Field Details

  • Constructor Details

    • UnsupportedProfile

      public UnsupportedProfile(String subcommand)
      Create an exception signalling a subcommand that does not support any profiles.
      Parameters:
      subcommand - subcommand
    • UnsupportedProfile

      public UnsupportedProfile(String subcommand, String profile)
      Create an exception signalling a subcommand does not support a specific profile.
      Parameters:
      subcommand - subcommand
      profile - unsupported profile
    • UnsupportedProfile

      public UnsupportedProfile(String errorMsg, SOPGPException.UnsupportedProfile e)
      Wrap an exception into another instance with a possibly translated error message.
      Parameters:
      errorMsg - error message
      e - exception
  • Method Details

    • getSubcommand

      public String getSubcommand()
      Return the subcommand name.
      Returns:
      subcommand
    • getProfile

      public String getProfile()
      Return the profile name. May return
      null
      .
      Returns:
      profile name
    • getExitCode

      public int getExitCode()
      Specified by:
      getExitCode in class SOPGPException