Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package aspects;
- import controller.*;
- public aspect ExceptionHandling {
- declare soft: SQLException: call (void *.cadastra(..)) || call (void *.atualiza(..)) || call (void *.exclui(..)) ||
- call (void *.listaEmpresas(..) || (void *.tabelaEmpresas(..)) ||
- call (void *.listaProdutos(..) || (void *.tabelaProdutos(..));
- void around(): call (void *.cadastra(..)) || call (void *.atualiza(..)) || call (void *.exclui(..))
- call (void *.listaEmpresas(..) || (void *.tabelaEmpresas(..)) ||
- call (void *.listaProdutos(..) || (void *.tabelaProdutos(..)) {
- try {
- proceed();
- } catch(SQLException e) {
- JOptionPane.showMessageDialog(null, e.getMessage(), "ERRO", JOptionPane.ERROR_MESSAGE);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement