4 Replies Latest reply on Aug 27, 2014 1:33 AM by Gary Graham-Oracle

    Blue line of script output

    Eslam_Elbyaly

      hi ,

      i am using 4.0.2.15 ,

      i used to see the line which refer to the error in my code as a blue line when i execute it as a script ,

      now i do not see it as a blue line , it's all black ?

        • 1. Re: Blue line of script output
          Gary Graham-Oracle

          You can try adjusting your preferences.  Look under Tools > Preferences > Code Editor > PL/SQL Syntax Coloring.  Probably one of the Available Styles such as PLSQL Errors, PLSQL Warnings, SQL & PLSQL Syntax Errors controls it.

          1 person found this helpful
          • 2. Re: Blue line of script output
            Eslam_Elbyaly

            i figured out that the blue color is displayed only in "sql" syntax , and i was writing "pl/sql" .

            thank you so much .

            • 3. Re: Blue line of script output
              Eslam_Elbyaly

              sorry , i do not know if there is a way to make the pl/sql errors shown like the sql errors ?

              in sql , it is shows in blue color ,

              in pl/sql , all script output is in one color , i do not know where the error is , and if i change it from where you told me , all the script output is changed

              not just the error place , how to change only the color place like in sql errors ?

              thank you

              • 4. Re: Blue line of script output
                Gary Graham-Oracle

                Sorry to mislead you with comments about syntax coloring preferences.  I misunderstood the question -- it is always best if you can provide a precise test case description along with sample code.

                 

                So, starting with the 4.0 releases, when executing SQL statements alone or embedded in simple SQL*Plus-like scripts, the script output tab does indeed color an output error line blue, and make it a hyperlink back to the offending line in the source code.  If one SQL statement contains multiple errors, only one error per execution is discovered and one must iterate through them all.

                 

                With scripts containing PL/SQL blocks, however, it seems this error hyperlink feature...

                1. Only identifies the starting line of the outermost level block containing the error.

                2. Does not color the error line blue if it occurs in the first block of the script.  However, such black error lines do hyperlink to source sometimes!

                3. The lines where the actual errors occur are neither colored blue nor made into hyperlinks.

                Not coloring an error line in the first block strikes me as a bug, but sorting out errors located in (possibly nested) PL/SQL blocks might fall into the category of an enhancement request. In order to better visualize what I am saying, take the following PL/SQL block (or make up an even simpler block), copy it multiple times into a worksheet, then introduce a different syntax error into each copy. Run Script (F5) to see where the the error line hyperlinks do and don't appear...

                SET SERVEROUTPUT ON

                DECLARE

                x NUMBER(4);

                BEGIN

                  x := 1000;

                  BEGIN

                    x := x + 100;

                  EXCEPTION

                    WHEN OTHERS THEN

                      x := x + 2;

                  END;

                  x := x + 10;

                  DBMS_OUTPUT.put_line(x);

                EXCEPTION

                  WHEN OTHERS THEN

                    x := x + 3;

                END;

                /

                I did things like misspell put_line, change 100 to 1Z00 (embedded character), and so on.

                 

                Regards,

                Gary