title: wrong number or types of arguments in call (while calling a procedure/function)
body: <p>If I want to catch this error using exception handling, what are the things that I need to take care of?</p>
  
  <blockquote>
    <p>wrong number or types of arguments in call (while calling a
    procedure/function)</p>
  </blockquote>
  
  <p>I trying was in different way. Could you please explain.  I have a function:</p>
  
  <pre><code>create or replace function test5(v varchar2) return varchar as
  begin
    execute immediate 'begin sweet.g:=:v;end;'
    using in v;
    return sweet.g;
  exception
  when others then 
    return sqlcode||' '||sqlerrm;
  end test5;
  </code></pre>
  
  <p>And a package spec and body:</p>
  
  <pre><code>create or replace package SWEET as
    function c ( v varchar2,V2 VARCHAR2) return varchar2;
    g varchar(100);
  end;
  /
  
  create or replace package body SWEET as
    function c(v varchar2, V2 varchar2) return varchar2 as
    begin
      return v||'hi'|| V2;
    end c;
  end; 
  /
  </code></pre>
  
  <p>when I execute the statement below, I was not able to catch 'wrong number or type of arguments'</p>
  
  <pre><code>select test5(sweet.c(,'hello')) from dual;
  </code></pre>