BaseTools: Replace StandardError with Expression