Repl.it error messages?
Is there a way that I can get a list of error messages for repl.it? Specifically the Python and C++ errors. For example a C++ error would be this:
I'm asking this since I'm making a project that tries to replicate an error message.
So is there a like a way I could get the different types of errors? Or do I have to just do it manually by putting errors in my code and seeing the result?
Repl doesn't have it's own error messages, Repl just runs the GCC / CLang compiler, the compiler is what issues errors and warnings. You'll need to look at their documentation for everything they have. (Just a tip, Clang gives better error messages).
Also, very important to note, neither of their error messages are too good, now Rust's error messages, those are great, go look at some Rust errors.
What do you mean getting the different types of errors?
As in a try catch
statement?
yeah, you are going to have to find them yourself ;)
errors are a platform-specific thing
You can look at GCC/Clang source code, for those.
Python has an exception class and a defined format for stack traces.
For SegFaults, just send a SEGV signal.
Now that this is the answer, let me be clear:Looking through the GCC code for error messages is not easy!
Thank you.
https://ftp.gnu.org/gnu/gcc