HTError constructor

HTError(
  1. ErrorCode code,
  2. ErrorType type, {
  3. String? message,
  4. String? extra,
  5. List interpolations = const [],
  6. String? correction,
  7. String? filename,
  8. int? line,
  9. int? column,
  10. int? offset,
  11. int? length,
})

HTError can not be created by default constructor.

Implementation

HTError(this.code, this.type,
    {String? message,
    this.extra,
    List interpolations = const [],
    this.correction,
    this.filename,
    this.line,
    this.column,
    this.offset,
    this.length}) {
  if (message != null) {
    for (var i = 0; i < interpolations.length; ++i) {
      message = message!.replaceAll('{$i}', interpolations[i].toString());
    }
    _message = message;
  }
}