Move .trim() and .markError() to common.
Supply a detailed diagnosis info just without a stack.