What is second value in error()?

so error() prints a red message to the output.

the first value is a string. the message to be printed red to the output. but it says that there is a second value. level : number
what does that number do?


Level is like an identifier for the error trace. Basically, The error tracer is where it shows where the error happened at. (Like a checkpoint, Or a Context for it) There’s several error levels, Here is a representation of the levels 1, 2 and 3:

If you want more information about Error Contexts or Security Levels, Take a look at the following articles:

I can see the difference between level 1 and (2,3) but i don’t see difference between level 2 and 3

It mostly depends on where you’re using the error() function at. Using it inside another function/method will show a different context. (As i only used it on the first script line and not inside another function)

1 Like

that’s what i thought. i thought if you make a local function that includes error() somehow, when calling the function the output will say that the error is from the line that Calls the function.

oh i think it tells the line that creates the function