← Back to team overview

do-plugins team mailing list archive

[Bug 375743] [NEW] Spurious console messages like 'encountered an error in <plugin>: Argument cannot be null'

 

Public bug reported:

I was noticing several console messages of the sort:

TSClient.TSClientItemSource "Terminal Server Connection Items" encountered an error in ChildrenOfItem: Argument cannot be null.
Parameter name: source.

GNOME.SessionCommandsItemSource "GNOME Session Commands" encountered an error in ChildrenOfItem: Argument cannot be null.
Parameter name: source.

These are caused by methods that return an IEnumerable simply returning
null.  Instead, they should 'yield break' to indicate they are finished
and so the caller has a non-null IEnumerable.

Did a search through the do-plugins trunk and found several instances of
this problem.  Patch is attached and needs a code review.  Tested and
seems to work for the plugins I was noticing these warnings (warnings
are gone, no noticeable changes in behavior).

Note that several bug reports include these messages as possible causes,
but they are not related to any of the prior reported bugs.  These
messages are only warnings.

** Affects: do-plugins
     Importance: Undecided
         Status: New

-- 
Spurious console messages like 'encountered an error in <plugin>: Argument cannot be null'
https://bugs.launchpad.net/bugs/375743
You received this bug notification because you are a member of GNOME Do
Plugins Team, which is subscribed to GNOME Do Plugins.



Follow ups

References