Returns a record containing fields Reason, Message, and Detail set to the provided values. The record can be used to raise or throw an error.