forked from LogBlock/LogBlock
error checking
This commit is contained in:
@@ -62,6 +62,7 @@ public class LogBlock extends Plugin
|
|||||||
|
|
||||||
public void disable()
|
public void disable()
|
||||||
{
|
{
|
||||||
|
if (consumer != null)
|
||||||
consumer.stop();
|
consumer.stop();
|
||||||
consumer = null;
|
consumer = null;
|
||||||
log.info(name + " v" + version + " Plugin Disabled.");
|
log.info(name + " v" + version + " Plugin Disabled.");
|
||||||
@@ -126,7 +127,9 @@ public class LogBlock extends Plugin
|
|||||||
log.log(Level.SEVERE, name + " SQL exception", ex);
|
log.log(Level.SEVERE, name + " SQL exception", ex);
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
|
if (rs != null)
|
||||||
rs.close();
|
rs.close();
|
||||||
|
if (ps != null)
|
||||||
ps.close();
|
ps.close();
|
||||||
conn.close();
|
conn.close();
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
@@ -189,7 +192,9 @@ public class LogBlock extends Plugin
|
|||||||
log.log(Level.SEVERE, name + " SQL exception", ex);
|
log.log(Level.SEVERE, name + " SQL exception", ex);
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
|
if (rs != null)
|
||||||
rs.close();
|
rs.close();
|
||||||
|
if (ps != null)
|
||||||
ps.close();
|
ps.close();
|
||||||
conn.close();
|
conn.close();
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
@@ -274,7 +279,9 @@ public class LogBlock extends Plugin
|
|||||||
log.log(Level.SEVERE, name + " SQL exception", ex);
|
log.log(Level.SEVERE, name + " SQL exception", ex);
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
|
if (rs != null)
|
||||||
rs.close();
|
rs.close();
|
||||||
|
if (ps != null)
|
||||||
ps.close();
|
ps.close();
|
||||||
conn.close();
|
conn.close();
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
@@ -345,7 +352,9 @@ public class LogBlock extends Plugin
|
|||||||
log.log(Level.SEVERE, name + " SQL exception", ex);
|
log.log(Level.SEVERE, name + " SQL exception", ex);
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
|
if (rs != null)
|
||||||
rs.close();
|
rs.close();
|
||||||
|
if (ps != null)
|
||||||
ps.close();
|
ps.close();
|
||||||
conn.close();
|
conn.close();
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
|
Reference in New Issue
Block a user