Exception class for handling shell-specific errors.
More...
#include <shell_parser_exception.h>
|
| | shell_parser_exception (shell_status nStatus, std::string sCommand, std::size_t nPos) |
| | Constructs a shell_exception instance.
|
| |
| shell_status | get_status () const noexcept |
| | Returns the error status associated with the exception.
|
| |
| const std::string & | get_command () const noexcept |
| | Returns the command that caused the exception.
|
| |
| std::size_t | get_position () const noexcept |
| | Returns the position in the command where the error occurred.
|
| |
Exception class for handling shell-specific errors.
This exception class is used to capture and report errors encountered during the parsing and execution of shell commands.
◆ shell_parser_exception()
| bs::shell_parser_exception::shell_parser_exception |
( |
shell_status |
nStatus, |
|
|
std::string |
sCommand, |
|
|
std::size_t |
nPos |
|
) |
| |
Constructs a shell_exception instance.
- Parameters
-
| nStatus | The status indicating the type of error. |
| sCommand | The command that caused the error. |
| nPos | The position in the command where the error occurred. |
◆ get_command()
| const std::string & bs::shell_parser_exception::get_command |
( |
| ) |
const |
|
inlinenoexcept |
Returns the command that caused the exception.
- Returns
- A string containing the command.
◆ get_position()
| std::size_t bs::shell_parser_exception::get_position |
( |
| ) |
const |
|
inlinenoexcept |
Returns the position in the command where the error occurred.
- Returns
- The position as a size_t value.
◆ get_status()
| shell_status bs::shell_parser_exception::get_status |
( |
| ) |
const |
|
inlinenoexcept |
Returns the error status associated with the exception.
- Returns
- The shell_status indicating the type of error.
The documentation for this class was generated from the following files: