In some places of my program I use a check that holds the script if the data doesn't match:

```
const a = 1;
//...
//...
if (param1 != 1 && param2 != 3) {
   return; // stop script
}
//...
//...
if (param1 != 1 && param2 != 3) {
   return; // stop script
}
//...
//...

```

So i create function:

```
function checkIfOk(param1, param2)
{
    if (param1 != 1 && param2 != 3) {
       return; // stop script
    }
}

```

But now:

```
const a = 1;
//...
//...
checkIfOk(param1, param2);
//...
//...
checkIfOk(param1, param2);
//...
//...

```

Doesn't pause the function at error.

```
const a = 1;
//...
//...
return checkIfOk(param1, param2);
//...
//...
return checkIfOk(param1, param2);
//...
//...

```

This stops the function in any situation.

I don't want use throw errors because I use it in functions, so program should still running.