I assume that by 'debug error' you mean that your exception handler writes out 'caught you'.
The reason that it does this is pretty obvious. First you construct an instance of A with A.a = -25, then you call geta(), and geta() throws if A.a is negative. Am I missing your point?
Indeed, as kspangsege said, the geta code throws exception as you should expect. There is also another issue. When geta throws, the stack is unwound and the destructor of A is called. The destructor raises another exception before the previous one is caught. When an exception is raised while another one is still active, terminate() will be called. This is practically a program crash.
Destructors should not throw, and they should also subsume all exceptions that are thrown within their body. If you need sophisticated error management, then you need a method that you can call before the object is destroyed.
There have been attempts to make the error reporting behavior of the destructor adaptable, like providing the uncaught_exception() function to check for the presence of currently active exceptions. The solutions are however conceptually underdeveloped and do not cater for all needs. Also, throwing in destructor while performing array delete produces undefined behavior anyways.
This is what happens:
* After the call of geta an exception will be raised (as wanted).
* Now stack unwinding happens.
* During stack unwinding all variables in the current scope (i.e. a) will be destroyed
* Now the destructor throws another exception
* An exception during stack unwinding causes terminate to be called which exits the program (or opens a debug window)
So, never allow exceptions to leave your destructor!