Fix to set state.error before throw the exception
Merge pull request #120 from gnomo567/master

Fix to set state.error before throw the exception