Fix undefined variable when throwing an exception.
Merge branch '1.0.x' of github.com:treshugart/Model into 1.0.x