error when layout code
Giggles220
Posts: 154
when trying to layout one of my stored procedures I get the following error. It doesn't happen for all code I try and layout. In this particular case I did not get an error when requesting that refactor layout the code.
System.ApplicationException: Exception within progress task ---> System.ArgumentException: Value does not fall within the expected range. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure) at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr) at RedGate.SQLPrompt.CommonVS.Editor.VSScriptProvider.IndexFromPosition(CaretPosition position) at RedGate.SQLPrompt.CommonUI.Refactor.ScriptHelper.GetPositionOfLineIndex(IScriptProvider script, CaretPosition caret) at ae.c(CaretPosition ) at RedGate.SQLPrompt.CommonUI.Refactor.Refactor.a(EditorWindowBase , b , c& ) at RedGate.SQLPrompt.CommonUI.Refactor.Refactor.a(EditorWindowBase , c& , b[] ) at RedGate.SQLPrompt.CommonUI.Refactor.Refactor.a.Run() at RedGate.SQLPrompt.CommonUI.Progress.TaskAggregator.Run() at RedGate.SQLPrompt.CommonUI.Forms.ProgressDialogue.a() --- End of inner exception stack trace --- at RedGate.SQLPrompt.CommonUI.Forms.ProgressDialogue.ShowProgress(ITaskRunner task) at RedGate.SQLPrompt.CommonUI.Refactor.Refactor.LayOutSql(EditorWindowBase editor, SqlPromptOptions options) at b.Execute() at RedGate.SQLPrompt.CommonVS.Commands.VSCommandControler.Exec(String CmdName, vsCommandExecOption ExecuteOption, Object& VariantIn, Object& VariantOut, Boolean& Handled)
Comments
Does it happen consistently for a particular script?
If so, would it be possible for you to give us the script that is causing the exception as it would help us fix the issue if we can reproduce it.
Thanks,
Tanya