This project is read-only.
1
Vote

export command throws an exception if the source queue is empty

description

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

comments

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.