duplicateDiagnostics method
Generates diagnostic information for duplicate entries with the given name.
Includes the stack trace of the original registration, if available.
Implementation
@protected
String duplicateDiagnostics(String name) {
final origin = entryOrigin(name);
if (origin == null) {
return '';
}
return '\nOriginal registration stack trace:\n$origin';
}