Fix incremental decoder constructor.
Test different types of errors.
Also test bad error code.