Page MenuHomePhabricator

Parsing for {nickname} instead of {0} no longer works
Open, WishlistPublic

Description

Exception is being thrown when a message with {nickname} is parsed. I'm not sure if other placeholders are affected, but they probably are. This appears to be caused by { and } being passed to String.Format(...), but this area of code needs investigation to find out where and how this has broken, and unit tests to be added.

System.FormatException: Input string was not in a correct format.
  at System.Text.StringBuilder.AppendFormatHelper (IFormatProvider provider, System.String format, ParamsArray args) <0xf43ef548 + 0x001eb> in <filename unknown>:0 
  at System.String.FormatHelper (IFormatProvider provider, System.String format, ParamsArray args) <0xf43ef490 + 0x00077> in <filename unknown>:0 
  at System.String.Format (System.String format, System.Object[] args) <0xf3d6b9a8 + 0x000b7> in <filename unknown>:0 
  at Helpmebot.Services.MessageService.RetrieveMessage (System.String messageKey, System.String contextPath, IEnumerable`1 arguments) <0xf3704d40 + 0x00223> in <filename unknown>:0 
  at Helpmebot.Services.MessageService.RetrieveMessage (System.String messageKey, System.Object context, IEnumerable`1 arguments) <0xf3704b38 + 0x00197> in <filename unknown>:0 
  at Helpmebot.Commands.FunStuff.TargetedFunCommand.ExecuteCommand () <0xed95f2a8 + 0x0008e> in <filename unknown>:0 
  at helpmebot6.Commands.GenericCommand.ReallyRunCommand () <0xf2b1c070 + 0x0028c> in <filename unknown>:0

Event Timeline

stwalkerster created this object with edit policy "Custom Policy".
stwalkerster lowered the priority of this task from High to Wishlist.Jan 6 2017, 8:13 PM
stwalkerster added a project: Helpmebot v7.

This never worked for commands, only brain stuff.

Deprioritising and pushing down to v7