This project is read-only.

export command throws an exception if the source queue is empty


An example of the exception info in the console output:
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object.
   at CoreServices.StreamWriterCommandEx.Run(Boolean first)
   at CoreServices.CommandBaseEx.Exec(Boolean first)
   at CoreServices.CommandBaseEx.Run(CommandBaseEx command)
   at MSMQManagementConsole.Program.Parse(String strCommand)
   at MSMQManagementConsole.Program.Run(String commandline, Boolean exit)
   at MSMQManagementConsole.Program.Main(String[] args)

file attachments


david_alexis wrote Jun 27, 2013 at 3:36 PM

Here's a fix (attached StreamWriterCommandEx.cs). It simply adds a null check on Message at line 83 to prevent the writer from operating on a null message.