ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 6897

[Release] [SIMPLE] Program Exception Handler

by IcyJake - 05-22-2019 - 07:20 PM
#1
As the title states, this is EXTREMELY simple, so don't think I'm releasing this thinking I'm some kind of god because this code isn't hard to write, at all. If you can't already tell by the name, what this does is outputs wherever there's an error with your exploit/cheat. It doesn't even really have to be an exploit or cheat either, this can work for a lot of other things. For example, say you have a Windows Form with a text-box (for putting code into) and a button (for executing the code). Let's say you put this C++ code in the text-box to execute:

Code:
#include <iostream>

using namespace std;

int main()
{
   int a = 5;

   cout << a << endl

   return 0;
}

The exception handler would point out an error with line 9 (cout << a << endl) and the error would say that the statement wasn't ended with a semicolon. It's pretty simple, but it's also very useful for error handling and testing code. Here's the code:

Code:
try
{
   // Your code/command
}

catch (const std::exception & e)
{
   MessageBoxA(0, e.what(), "Error", 0);  // Prints where you messed up or where an error is
}

catch (...)
{
   MessageBoxA(0, "Unexpected error", "", 0);
}
Reply
#2
Thanks for this its a good help!
Reply
#3
(10-15-2020 - 09:28 PM)KINGSPEED420 Wrote: Thanks for this its a good help!

No problem, man.
Reply

Users browsing: 3 Guest(s)