vrodedanya / naobi

Naobi language
https://vrodedanya.github.io/naobi/
MIT License
4 stars 0 forks source link

[FEATURE] Catching exceptions #13

Closed vrodedanya closed 2 years ago

vrodedanya commented 2 years ago

Is your feature request related to a problem? Please describe. Some functions can be the cause of exceptions which we can't handle by returning values. So we need to create catch statement

Describe the solution you'd like I think we don't need to create try block. Just catch statement after some code:

import standard;
workflow main
{
    integer temp = int("text");
    catch CastException
    {
        println("Catch exception")
    }
}
vrodedanya commented 2 years ago

Added in 7bf0281