Print Thread
Alternative quoting causing "Unable to perform operation due to errors in source code"
#59315 01/03/19 10:10 AM
Joined: Oct 2018
Posts: 11
S
Sztefi Offline OP
Member
OP Offline
Member
S
Joined: Oct 2018
Posts: 11
Hello.
In many packages I'm developing I can't see the object navigation list in the package body view because PLSQL Developer returns error 'Unable to perform operation due to errors in source code' - while the code is correct and compiled.
I've found, that one of the reason (maybe the only one) is an alternative quoting used in applications, as we very often use "!" or "#" as a quote_delimiter.
Eg.
q'!Any '[text]' '{with}' anything '(but)' "!" at the end!'
q'#Any '[text]' '{with}' anything '!but!' "#" at the end#'

Even in sql window this kind of alternative quoting is wrongly displayed, while it's correct.

This is very frustrating bug as I'm usually dealing with 10000+ lines packages.

Re: Alternative quoting causing "Unable to perform operation due to errors in source code"
Sztefi #59316 01/03/19 10:43 AM
Joined: Aug 1999
Posts: 22,207
Member
Offline
Member
Joined: Aug 1999
Posts: 22,207
Can you let me know your exact PL/SQL Developer version?


Marco Kalter
Allround Automations
Re: Alternative quoting causing "Unable to perform operation due to errors in source code"
Marco Kalter #59317 01/03/19 10:48 AM
Joined: Oct 2018
Posts: 11
S
Sztefi Offline OP
Member
OP Offline
Member
S
Joined: Oct 2018
Posts: 11
Version 12.0.7.1837 (64 bit)
Windows 10 Build 17134

Last edited by Sztefi; 01/03/19 10:49 AM.
Re: Alternative quoting causing "Unable to perform operation due to errors in source code"
Sztefi #59319 01/03/19 11:09 AM
Joined: Aug 1999
Posts: 22,207
Member
Offline
Member
Joined: Aug 1999
Posts: 22,207
I can reproduce the highlighting issue, which only works correctly for the following pairs:

Code
q'(text)' 
q'<text>'
q'[text]'
q'{text}'
I cannot yet reproduce the 'Unable to perform operation due to errors in source code' error yet though. Can you show an example of a piece of code where this occurs?

Last edited by Marco Kalter; 01/03/19 11:10 AM.

Marco Kalter
Allround Automations
Re: Alternative quoting causing "Unable to perform operation due to errors in source code"
Marco Kalter #59323 01/03/19 04:31 PM
Joined: Oct 2018
Posts: 11
S
Sztefi Offline OP
Member
OP Offline
Member
S
Joined: Oct 2018
Posts: 11
I must admit it wasn't easy to "extract" the issue, but I guess I've found it.
It looks like the problem is present when there's a quotation mark just after quote_delimiter, like this: q'!'sthing...
Please check below simple package that is showing the error.
You can observe the issue (blank object list and the error from subject) when opening the compiled package or after switching from body view to specification view and then back to the body:
SQL Query
CREATE OR REPLACE PACKAGE pkg_tst IS

  FUNCTION fn_test(in_parm IN VARCHAR2)
    RETURN NUMBER;

END pkg_tst;
/
CREATE OR REPLACE PACKAGE BODY pkg_tst IS

  FUNCTION fn_test(in_parm IN VARCHAR2)
    RETURN NUMBER IS
      l_txt CLOB;
    BEGIN
      l_txt := q'!SELECT '!'||in_parm||q'!' as filtr_name FROM dummy!';
      RETURN 1;
    END fn_test;

END pkg_tst;
/

Re: Alternative quoting causing "Unable to perform operation due to errors in source code"
Sztefi #59324 01/03/19 05:35 PM
Joined: Aug 1999
Posts: 22,207
Member
Offline
Member
Joined: Aug 1999
Posts: 22,207
Thanks. This does indeed not seem to be parsed correctly. We'll fix it!


Marco Kalter
Allround Automations
Re: Alternative quoting causing "Unable to perform operation due to errors in source code"
Marco Kalter #59647 02/21/19 08:40 AM
Joined: Oct 2018
Posts: 11
S
Sztefi Offline OP
Member
OP Offline
Member
S
Joined: Oct 2018
Posts: 11
I confirm new version, 13.0.1.1893 fixed the issue with package objects list displaying - finally I can easily work with huge packages smile

Thank you.

Still proper highlighting for other quote_delimiters than (), {} and [] isn't working - though this one is not so urgent smile


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.027s Queries: 15 (0.007s) Memory: 2.5250 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-05-02 07:26:01 UTC
Valid HTML 5 and Valid CSS