myshell 2.0.0
Loading...
Searching...
No Matches
msh_error.h
1//
2// Created by andrew on 10/8/23.
3//
4
5#ifndef MYSHELL_MSH_ERROR_H
6#define MYSHELL_MSH_ERROR_H
7
8#include <string>
9
10extern int msh_errno;
11
12void error_log();
13
14void msh_error(const std::string &msg);
15
16enum msh_err {
17 INTERNAL_ERROR = 1,
18 COMMAND_NOT_FOUND = 127,
19 UNKNOWN_ERROR = 128
20};
21
22#endif //MYSHELL_MSH_ERROR_H
void error_log()
Log the line number and path of the executed script, if any.
Definition msh_error.cpp:22
void msh_error(const std::string &msg)
Print an error message to stderr with a myshell: prefix.
Definition msh_error.cpp:37