This switches instances of RuntimeError to a module specific PowershellError class so callers can tell what's going on with a bit more detail. This also uses a new error, when the generate command line maximum is exceeded. This can allow the caller to potentially handle it by adjusting options. No logic is changed and all modified exceptions are still derived from the original RuntimeError.
This switches instances of
RuntimeError
to a module specificPowershellError
class so callers can tell what's going on with a bit more detail. This also uses a new error, when the generate command line maximum is exceeded. This can allow the caller to potentially handle it by adjusting options. No logic is changed and all modified exceptions are still derived from the originalRuntimeError
.This will be needed by a Metasploit PR.