throw logic_error when envcontext has no delta array.
add method to check type mismatch.