Allow zero-length slices.
Implement error and add abort_error/generic_error_code.