[Include] try-catch for not-implemented features
#1

This brings a solution to a rather common problem we had for years.

A very common problem:
Code:
stock MyFunc() {
    ObviousFeatureThatDoesNotExist();
}

stock ObviousFeatureThatDoesNotExist() {
    throw new NotImplementedInSampException();
}
Result: uncaught exception

Code:
stock ΟpenМp() {
    try {
        MyFunc();
    } catch (ObviousFeatureThatDoesNotExist e) {
        ImplementFeature(e);
    }
Result: the feature becomes implemented
Reply
#2

Hi sweedish neighbour.

mp is an object of open btw..
Reply
#3

Woah, this code is revolutionary! Very cool. Who would have thought that the solution to this problem was really simple :O

Said my brain on drugs lmao.
Reply
#4

Thank you
Reply
#5

Quote:
Originally Posted by Slice
View Post
Thank you
Hello sir, I received this error

Code:
Error 069: Feature denied
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)