Javascript alternative exit

I want to exit a JavaScript with an alternative path, similar to error condition. I have been checking on the Constants available and have not been able to understand the ERROR WORKFLOW. It just continues processing the workflow.

Basicly, what I am trying to accomplish,
If (value > 0) { Continue Workflow} ,
If (value = 0) { End Workflow}.
This workflow processes just one record based on time difference.

I know I can insert a value and then check on this value in a second step, but would be unnecesary if it can be done within JS.

Thanks

Then Filter row