I got this unhandled exception - the problem is reproducible with a long query I have (give me a redgate mail address to forward, I just don't have time to reproduce in a simpler way):
"The supplied name must contain a non-empty object name.
'zioni.dbo.CostoTrasporto_CentriCosto c1 ON c1.' is an invalid name.
Parameter name: name.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentOutOfRangeException: The supplied name must contain a non-empty object name. 'zioni.dbo.CostoTrasporto_CentriCosto c1
ON c1.' is an invalid name.
Parameter name: name
at RedGate.Util.EventHandlerSet.Fire(Object eventKey, Object sender, EventArgs args)
at RedGate.Util.EventHandlerSet._1.Fire(Object eventKey, Object sender, EventArgs args)
at _43._1(CaretPosition , CaretPosition )
at _43.set_CaretPosition(CaretPosition value)
at RedGate.SqlPrompt.Engine.SqlPromptEngine.set_CaretPosition(CaretPosition value)
at _12._4(Object , EventArgs )
at _10.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
"The supplied name must contain a non-empty object name.
'zioni.dbo.CostoTrasporto_CentriCosto c1 ON c1.' is an invalid name.
Parameter name: name.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentOutOfRangeException: The supplied name must contain a non-empty object name. 'zioni.dbo.CostoTrasporto_CentriCosto c1
ON c1.' is an invalid name.
Parameter name: name
at RedGate.Util.EventHandlerSet.Fire(Object eventKey, Object sender, EventArgs args)
at RedGate.Util.EventHandlerSet._1.Fire(Object eventKey, Object sender, EventArgs args)
at _43._1(CaretPosition , CaretPosition )
at _43.set_CaretPosition(CaretPosition value)
at RedGate.SqlPrompt.Engine.SqlPromptEngine.set_CaretPosition(CaretPosition value)
at _12._4(Object , EventArgs )
at _10.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)