mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Include stack traces in logs.
This commit is contained in:
@@ -155,9 +155,9 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
|
|||||||
hangUp();
|
hangUp();
|
||||||
}
|
}
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||||
} catch(SerialPortException e) {
|
} catch(SerialPortException e) {
|
||||||
if(LOG.isLoggable(WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
|
|||||||
answer();
|
answer();
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(WARNING))
|
if(LOG.isLoggable(WARNING))
|
||||||
LOG.warning(e.toString());
|
LOG.log(WARNING, e.toString(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -239,7 +239,7 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
|
|||||||
try {
|
try {
|
||||||
port.closePort();
|
port.closePort();
|
||||||
} catch(SerialPortException e) {
|
} catch(SerialPortException e) {
|
||||||
if(LOG.isLoggable(WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
|||||||
running = true;
|
running = true;
|
||||||
return true;
|
return true;
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -98,7 +98,7 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
|||||||
LOG.info("Initialised modem on " + portName);
|
LOG.info("Initialised modem on " + portName);
|
||||||
return true;
|
return true;
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
running = false;
|
running = false;
|
||||||
@@ -142,7 +142,7 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
|||||||
try {
|
try {
|
||||||
if(!modem.dial(number)) continue;
|
if(!modem.dial(number)) continue;
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||||
if(resetModem()) continue;
|
if(resetModem()) continue;
|
||||||
else break;
|
else break;
|
||||||
}
|
}
|
||||||
@@ -170,7 +170,7 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
|||||||
try {
|
try {
|
||||||
if(!modem.dial(number)) return null;
|
if(!modem.dial(number)) return null;
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||||
resetModem();
|
resetModem();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -218,7 +218,7 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
|||||||
try {
|
try {
|
||||||
modem.hangUp();
|
modem.hangUp();
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||||
exception = true;
|
exception = true;
|
||||||
}
|
}
|
||||||
if(exception) resetModem();
|
if(exception) resetModem();
|
||||||
|
|||||||
Reference in New Issue
Block a user