errorBy method
Returns error code by exception.
Implementation
@protected
int errorBy(RunException exception, {String? title}) {
final sb = StringBuffer();
if (title?.isNotEmpty == true) sb.writeln(title);
if (exception.message?.isNotEmpty == true) sb.write(exception.message);
return error(exception.exitCode, message: sb.toString());
}