1 ) A compiler apparatus for optimizing exception handling in a target program as a program to be compiled, comprising: an exception handler detection section for detecting, from exception handlers that catch exceptions thrown in said target program, a multiple-catching exception handler that catches a plurality of different exceptions and rethrow the caught exceptions; an exception selection section for selecting a set of exceptions that are to be shifted to common processing through rethrow of the exception by said multiple-catching exception handler from among said plurality of exceptions caught by said multiple-catching exception handler detected; and an exception handler throw section for throwing a clone exception handler that catches the set of exceptions selected by said exception selection section instead of said multiple-catching exception handler and shifting it to said common processing.