change exception type
add tests for nowrap mode of case db cache
add comment clarifying semi-magical behavior