Tapatalk

Configure Go To Error/Warning?

Configure Go To Error/Warning?

2
NewbieNewbie
2

    Sep 06, 2008#1

    I downloaded UltraEdit to see if it would be a better choice than the text editor, I'm currently using. UE seems to have most of what I need, but I've run into one showstopper. I work a lot with SQL (more precisely Microsoft SQL Server), and I load SQL files through my own load tool, which produces error messages like:

    Code: Select all

    Msg 2715, Level 16, Line 20, C:\Program Files\AbaPerls\SQL\SP\ap_cos_insert_sp.sp
    Column, parameter, or variable #1: Cannot find data type ap_subsystem.
    Parameter or variable '@subsystem' has an invalid data type.
    
    What I want is of course to double-click the error message to come to the line with the error, but I end up at the first line in the file. Other editors permit me to specify a regular expression to inform the editor where to find line number and file. My impression from the Help file is that UE tries to guess this on its own. I had a look at the syntax definition files, but at a glance I could not see anything.

    Before I give up on UltraEdit, is there anything I have missed?

    6,685587
    Grand MasterGrand Master
    6,685587

      Sep 07, 2008#2

      UltraEdit has not configuration setting for finding file names and line numbers in captured output. UltraEdit has built-in code to detect file names and line numbers in output messages for formats commonly used by compilers. The important difference here between the format your load tool uses and compilers is that the line number is left to the file name. Commonly the file name is left and the line number follows immediately the file name separated by a / or specified in (), for example:

      Msg 2715, Level 16, C:\Program Files\AbaPerls\SQL\SP\ap_cos_insert_sp.sp/20
      Msg 2715, Level 16, C:\Program Files\AbaPerls\SQL\SP\ap_cos_insert_sp.sp(20)

      Such a format would be no problem for UltraEdit. Maybe you can change your load tool to support this format additionally or to always output messages in this format.

      If you can't modify your load tool, you can write a little and very simple program which converts the output messages in the format of your load tool to the format UltraEdit can handle. I have written for myself such a format converter for 2 of my tools. One is quite simple as yours would be because only the easy to detect error message line must be slightly modified. The other was much harder to develop because the tool used various output formats depending on the type of input file and my converter has to detect all these formats and produce always the same output format with automatically adding missing informations like full path of the input file. In run the 2 tools with my converters as follows from within UltraEdit via 2 user tools:

      Tool.exe | "MyConverter.exe"

      MyConverter.exe reads in from stdin line by line what Tool.exe writes to stdout. If the line is an error or warning message which must be reformatted, it does this and outputs the reformatted line to stdout. Otherwise it just outputs the line from stdin to stdout without changing anything. UltraEdit captures what my converter outputs. Well, my second converter, the complex one, additionally filters out also lines which are not of interest for me. So it is a converter + filter which produces the output suitable for UltraEdit and with only the informations I really need.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Sep 07, 2008#3

        Thanks for the answer.

        I cannot just change the error message right off, because there are other people who use the tool as well, and who has configured their editors to look for the error message in the current form. But of course, I could have an environment variable or a command-line option to control the format of the error message.