[DDMD] Do all error emission in the frontend

@ibuclaw