how to tell pass error to next function in javascript code example Example: javascript how to raise the error if (..condition..) { throw 'Error message'; }