Domanda Java veloce e parentale: parentesi attorno a SQLException
-
03-07-2019 - |
Domanda
try {
...
} catch (SQLException sqle) {
String theError = (sqle).getSQLState();
...
}
Cosa fanno i sql
circostanti con le parentesi? Tutto ciò?
Solo curioso.
Soluzione
Risposta rapida - Niente.
Risposta più lunga - Potrebbe essere un residuo di un cast in linea:
((SomeMoreSpecificException)sqle).get...
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow