title: How to propagate globally defined exception through execute immediate?
body: <p>Here is a minimal test case that for some reason fails with </p>
  
  <blockquote>
    <p>ORA-06510: PL/SQL: unhandled user-defined exception</p>
  </blockquote>
  
  <pre><code>CREATE PACKAGE my_test
  AS
    global_exception EXCEPTION;
  END;
  /
  
  set serveroutput on;
  
  BEGIN
    execute immediate 'BEGIN RAISE my_test.global_exception; END;';
  EXCEPTION
    WHEN my_test.global_exception THEN 
      dbms_output.put_line('global_exception');
  END;
  /
  </code></pre>
  
  <p>Here is a test case that works: </p>
  
  <pre><code>BEGIN
    RAISE my_test.global_exception;
  EXCEPTION
    WHEN my_test.global_exception THEN 
      dbms_output.put_line('global_exception');
  END;
  /
  </code></pre>
  
  <p>Is there a way to raise global exceptions through EXECUTE IMMEDIATE? 
  Database version 12c or 11g</p>