this might better be organized like: 

```erlang 
case foo of 
    C when C >= 0 -> 
       ....; 
    _ -> err message 
end
```
Right now it doesn't actually check if your integer is positive.