@@ -71,8 +71,6 @@ Parameters:
7171whenever sqlerror exit failure
7272whenever oserror exit failure
7373conn &1
74- whenever sqlerror continue
75- whenever oserror continue
7674
7775set serveroutput on size unlimited format truncated
7876set trimspool on
@@ -115,13 +113,16 @@ set define &
115113*/
116114@@define_params_variable.sql.tmp
117115
116+
117+
118118var l_paths varchar2(4000);
119119var l_color_enabled varchar2(5);
120120var l_run_params_cur refcursor;
121121var l_out_params_cur refcursor;
122122/*
123- * Parse parameters and returning as variables
123+ * Parse parameters and return them as variables
124124*/
125+ set termout on
125126declare
126127
127128 type t_call_param is record (
@@ -139,6 +140,26 @@ declare
139140 l_run_cursor_sql varchar2(32767);
140141 l_out_cursor_sql varchar2(32767);
141142
143+ function is_reporter(a_reporter_name varchar2) return varchar2 is
144+ l_reporter_name varchar2(4000);
145+ l_dummy integer;
146+ e_invalid_reporter exception;
147+ pragma exception_init (e_invalid_reporter,-44002);
148+ begin
149+ l_reporter_name := dbms_assert.simple_sql_name(a_reporter_name);
150+ select 1
151+ into l_dummy
152+ from all_types
153+ where connect_by_isleaf = 1
154+ and type_name = 'UT_REPORTER_BASE'
155+ connect by type_name = prior supertype_name
156+ start with type_name = upper(l_reporter_name);
157+ return l_reporter_name;
158+ exception
159+ when no_data_found or e_invalid_reporter then
160+ raise_application_error(-20000, 'Invalid reporter name specified: '||a_reporter_name);
161+ end;
162+
142163 function parse_reporting_params(a_params ut_varchar2_list) return tt_call_params is
143164 l_default_call_param t_call_param;
144165 l_call_params tt_call_params := tt_call_params();
@@ -159,7 +180,7 @@ declare
159180 l_call_params.extend;
160181 l_call_params(l_call_params.last) := l_default_call_param;
161182 if param.param_type = 'f' then
162- l_call_params(l_call_params .last ).ut_reporter_name := dbms_assert . simple_sql_name (param .param_value );
183+ l_call_params(l_call_params.last).ut_reporter_name := is_reporter (param.param_value);
163184 end if;
164185 l_force_out_to_screen := false;
165186 end if;
@@ -241,7 +262,7 @@ begin
241262 end if;
242263end;
243264/
244-
265+ set termout off
245266
246267/*
247268* Generate runner script
@@ -316,7 +337,7 @@ spool off
316337*/
317338set define #
318339--try running on windows
319- $ start sqlplus # #1 @run_in_backgroung.sql.tmp
340+ $ start /min sqlplus ##1 @run_in_backgroung.sql.tmp
320341--try running on linus/unix
321342! sqlplus ##1 @run_in_backgroung.sql.tmp &
322343set define &
0 commit comments