I prefer to not have the rest of this as an indented else clause.  Make it:

```
if (...) {
  throw...
}

// rest of code
```

That way we avoid excessive indentation.