Fix for missing ThrowCodeError routine error

Simple fix for a missing ThrowCodeError routine error