Lines Matching full:exception

67  * stored in the C++ exception.
76 // On ARM, we store the saved exception in the generic part of the structure
82 // and this is not a foreign exception.
139 * A cleanup - the exception will propagate through this frame, but code
144 * A catch statement. The exception will not propagate past this frame
163 /** The unexpected exception handler for this thread. */
169 * fails to return memory for allocating an exception. Threads are not
176 * The exception currently running in a cleanup.
181 * caught if we have just caught an exception and rethrown if we are
197 * Dependent exception. This
241 class exception
244 virtual ~exception() _LIBCXXRT_NOEXCEPT;
251 * Class of exceptions to distinguish between this and other exception types.
265 * The low four bytes of the exception class, indicating that we conform to the
267 * if we change our exception class, to allow this library and libsupc++ to be
338 fprintf(stderr, "Terminating due to uncaught exception %p", static_cast<void*>(ex));
341 static_cast<const __class_type_info*>(&typeid(std::exception));
346 std::exception *e =
347 static_cast<std::exception*>(e_ti->cast_to(static_cast<void*>(ex+1), throw_ti));
373 /** The global unexpected exception handler. */
381 * Cleanup function, allowing foreign exception handlers to correctly destroy
382 * this exception if they catch it.
387 // Exception layout:
388 // [__cxa_exception [_Unwind_Exception]] [exception object]
390 // __cxa_free_exception expects a pointer to the exception object
410 // immediately follows the exception, not the exception itself
423 // If this is a foreign exception, ask it to clean itself up.
522 fputs("Out of memory attempting to allocate exception\n", stderr);
651 fprintf(stderr, "Out of memory attempting to allocate exception\n");
674 * Allocates an exception structure. Returns a pointer to the space that can
694 * __cxa_free_exception() is called when an exception was thrown in between
695 * calling __cxa_allocate_exception() and actually throwing the exception.
696 * This happens when the object's copy constructor throws an exception.
721 static void releaseException(__cxa_exception *exception)
723 if (isDependentException(exception->unwindHeader.exception_class))
725 __cxa_free_dependent_exception(exception+1);
728 if (__sync_sub_and_fetch(&exception->referenceCount, 1) == 0)
731 // which immediately follows the exception, not the exception
733 __cxa_free_exception(exception+1);
749 * Report a failure that occurred when attempting to throw an exception.
752 * a handler, catch the exception before calling terminate. The default
819 * ABI function for throwing an exception. Takes the object to be thrown (the
876 * ABI function. Rethrows the current exception. Does not remove the
877 * exception from the stack or decrement its handler count - the compiler is
896 "Attempting to rethrow an exception that doesn't exist!\n");
909 assert(ex->handlerCount > 0 && "Rethrowing uncaught exception!");
913 // `_Unwind_Resume_or_Rethrow` directly to rethrow the exception.
914 // This path is only reachable if we're rethrowing a C++ exception -
922 // exception was rethrown and exception object should not be destroyed
926 // Continue unwinding the stack with this exception. This should unwind to
928 // will then run cleanup code and bounce the exception back with
961 * object. If ex is 0 then it is assumed to be a foreign exception and only
976 // Always match a catchall, even with a foreign exception
1008 * Checks whether the exception matches the type specifiers in this action
1009 * record. If the exception only matches cleanups, then this returns false.
1013 * second exception register when installing the context.
1063 // If the exception spec matches a permitted throw type for
1065 // propagate this exception out.
1074 // If we don't find an allowed exception spec, we need to install
1076 // unexpected exception function. Treat this as a catch
1108 * The exception personality function. This is referenced in the unwinding
1124 // If this exception is throw by something else then we can't make any
1129 // If this isn't a foreign exception, then we have a C++ exception structure
1147 // These two variables define how the exception will be handled.
1172 // EH range not found. This happens if exception is thrown and not
1175 // exception object will contain null when personality function is
1187 // and this is not a foreign exception.
1201 // If this is a foreign exception, we didn't have anywhere to cache the
1203 // unwind, a foreign exception, or a cleanup, then we just install the
1226 // Uncaught exception in cleanup, calling terminate
1250 * pointer to the caught exception, which is either the adjusted pointer (for
1259 // We can't call the fast version here, because if the first exception that
1260 // we see is a foreign exception then we won't have called it yet.
1267 // Only exceptions thrown with a C++ exception throwing function will
1283 // Rethrown exception is catched before end of catch block.
1285 // to delete this exception at the end of the catch block, as long
1313 // If this is a foreign exception, then we need to be able to
1332 * exception if it is no longer referenced in other catch blocks.
1342 assert(0 != ex && "Ending catch when no exception is on the stack!");
1361 // exception was rethrown. Exception should not be deleted even if
1396 * ABI function. Returns the type of the current exception.
1414 * ABI function, called when an exception specification is violated.
1418 extern "C" void __cxa_call_unexpected(void*exception)
1420 _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(exception);
1422 // and `__cxa_end_catch` so that we correctly update exception counts if
1423 // the unexpected handler throws an exception.
1444 * exception during stack unwinding.
1448 extern "C" void __cxa_call_terminate(void*exception) _LIBCXXRT_NOEXCEPT
1456 * ABI function, returns the adjusted pointer to the exception object.
1505 * Sets the function that will be called when an exception specification is
1543 * Called when an unexpected exception is encountered (i.e. an exception
1544 * violates an exception specification). This calls abort() unless a