mkErrorAppDs now takes an SDoc rather than a String