Please note that this translation of the specification is the result of a java.net community project ( https://jdk5-api-pt-br.dev.java.net/ ). The official version of the specification is the US English language version which can be found at http://java.sun.com/j2se/1.5.0/docs/api/. In case of disputes, the authoritative version of the specification is the original, English document.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface Thread.UncaughtExceptionHandler
Interface para manipuladores invocados quando um Thread termina abruptamente devido a uma exceção não-capturada.
Quando uma linha de execução está para terminar devido a uma exceção, a Máquina
Virtual Java (Java Virtual Machine) irá buscar a linha de execução para o seu
UncaughtExceptionHandler usando Thread.getUncaughtExceptionHandler()
e irá invocar o método uncaughtException do manipulador, passando a linha
de execução e a exceção como argumentos.
Se uma linha de execução não tivesse um UncaughtExceptionHandler
explicitamente definido, enão seu objeto ThreadGroup age como seu
UncaughtExceptionHandler. Se o objeto ThreadGroup
não tem requisitos especiais para lidar com a exceção, ela não pode direcionar
a invocação para o default uncaught exception handler.
Thread.setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler),
Thread.setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler),
ThreadGroup.uncaughtException(java.lang.Thread, java.lang.Throwable)| Method Summary | |
|---|---|
void |
uncaughtException(Thread t,
Throwable e)
Método invocado quando a linha de execução dada é terminada devido a exceção não-capturada informada. |
| Method Detail |
|---|
void uncaughtException(Thread t,
Throwable e)
Qualquer exceção lançada por esse método será ignorada pela Máquina Virtual Java (Java Virtual Machine).
t - a linha de execuçãoe - a exceção
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
Copyright 2006 Sun Microsystems, Inc. Todos os direitos reservados. O uso está sujeito aos termos da licensa.