Refactor to use YAZ_SRW-diagnostic codes