CLI::F...ptions(3pm)

πŸ“¦
version 0.05 Β· 2 versions
  • 0.05 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.05 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸŽ€ CLI::Framework::Exceptions πŸŽ€

okay so hi bestie!! you've landed on the CLI::Framework::Exceptions page, straight out of the User Contributed Perl Documentation, section 3pm. it's giving "the feelings department of CLIF" and honestly? iconic. this is where all the throwing and catching of bad vibes happens. let's get into it πŸ’…


🌸 NAME 🌸

CLI::Framework::Exceptions β€” Exceptions used by CLIF


✨ EXCEPTION TYPES ✨

so like, this package defines the following exception types, and no cap, every single one of them is built with Exception::Class and they're all subtypes of Exception::Class::Base. they're the whole roster. the squad. the main characters 🫢

πŸ‘‘ CLI::Framework::Exception

  • description β€” General CLIF error
  • alias β€” throw_clif_exception

the general-purpose one. the "something happened and it wasn't cute" error. when in doubt, this one's your girl πŸ’–

πŸ¦‹ CLI::Framework::Exception::AppHookException

  • description β€” Application hook method failed preconditions
  • alias β€” throw_app_hook_exception

your hook method didn't meet its preconditions. the vibe check was failed. sad but true 😭

πŸ“ CLI::Framework::Exception::AppOptsParsingException

  • description β€” Failed parsing of application options
  • alias β€” throw_app_opts_parse_exception

the application options would not parse. not me trying to read them and just... no πŸ’€

🧚 CLI::Framework::Exception::AppOptsValidationException

  • description β€” Failed validation of application options
  • alias β€” throw_app_opts_validation_exception

they parsed fine, but they did not pass validation. the options showed up to the party in the wrong outfit πŸ™ˆ

⭐ CLI::Framework::Exception::AppInitException

  • description β€” Failed application initialization
  • alias β€” throw_app_init_exception

the application failed to initialize. it simply did not start. periodt πŸŽ€

πŸ’€ CLI::Framework::Exception::InvalidCmdException

  • description β€” "Invalid command"
  • alias β€” throw_invalid_cmd_exception

that command? not a real one. bestie, that's not on the menu πŸ”₯

🌈 CLI::Framework::Exception::CmdRegistrationException

  • description β€” Failed command registration
  • alias β€” throw_cmd_registration_exception

the command couldn't be registered. it wanted to be in the system and the system said no πŸ’”

πŸ’œ CLI::Framework::Exception::TypeException

  • description β€” Object is not of the proper type
  • alias β€” throw_type_exception

the object is not the proper type. it's giving "wrong energy entirely" ✨

🫢 CLI::Framework::Exception::CmdOptsParsingException

  • description β€” Failed parsing of command options
  • alias β€” throw_cmd_opts_parse_exception

the command's options refused to parse. relatable honestly 😭

πŸ‘‘ CLI::Framework::Exception::CmdValidationException

  • description β€” Failed validation of command options/arguments
  • alias β€” throw_cmd_validation_exception

command options and arguments both flunked validation. equal opportunity disappointment 🌸

πŸ”₯ CLI::Framework::Exception::CmdRunException

  • description β€” Failure to run command
  • alias β€” throw_cmd_run_exception

the command was supposed to run and it did not run. it's over πŸ’…


πŸ’– EXPORTS πŸ’–

so every single one of those aliases up there is available for use by client code β€” but listen, none of them are exported by default. you have to actually ask for them, bestie, they're not just gonna show up uninvited πŸ™ˆ

and if you want the whole entire crew at once? the ':all' tag causes all of the "alias"es to be exported. one tag, whole squad, no notes πŸŽ€

ngl this is the entire export situation. that's it. that's the section. short and slay ✨

πŸ¦‹ SEE ALSO πŸ¦‹

  • Exception::Class β€” the parent class energy behind all of this 🧚
  • CLI::Framework::Application β€” the app itself, where a lot of these feelings get felt πŸ‘‘

and that's the whole page, bestie!! this little gem ships with perl v5.34.0 and was dated 2022-06-11. go forth and catch your exceptions with grace πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from