mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
do not report "normal" user errors to Google Analytics, only unexpected crashes
This commit is contained in:
parent
a7634b50c1
commit
fa29a56303
@ -5,15 +5,14 @@
|
||||
*/
|
||||
package net.azib.ipscan.exporters;
|
||||
|
||||
import net.azib.ipscan.core.UserErrorException;
|
||||
|
||||
/**
|
||||
* Exception for throwing in case of problems in Exporters.
|
||||
*
|
||||
* @author Anton Keks
|
||||
*/
|
||||
public class ExporterException extends IllegalArgumentException {
|
||||
|
||||
static final long serialVersionUID = 746237846273847L;
|
||||
|
||||
public class ExporterException extends UserErrorException {
|
||||
public ExporterException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
@ -5,22 +5,15 @@
|
||||
*/
|
||||
package net.azib.ipscan.feeders;
|
||||
|
||||
import net.azib.ipscan.core.UserErrorException;
|
||||
|
||||
/**
|
||||
* Exception for throwing in case of problems with Feeders.
|
||||
*
|
||||
* @author Anton Keks
|
||||
*/
|
||||
public class FeederException extends IllegalArgumentException {
|
||||
|
||||
static final long serialVersionUID = 746237846273847L;
|
||||
|
||||
public class FeederException extends UserErrorException {
|
||||
public FeederException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public FeederException(String message, Throwable cause) {
|
||||
super(message);
|
||||
initCause(cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,19 +5,9 @@
|
||||
*/
|
||||
package net.azib.ipscan.fetchers;
|
||||
|
||||
/**
|
||||
* FetcherException
|
||||
*
|
||||
* @author Anton Keks
|
||||
*/
|
||||
public class FetcherException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public FetcherException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
import net.azib.ipscan.core.UserErrorException;
|
||||
|
||||
public class FetcherException extends UserErrorException {
|
||||
public FetcherException(String label, Throwable cause) {
|
||||
super(label, cause);
|
||||
}
|
||||
@ -25,5 +15,4 @@ public class FetcherException extends RuntimeException {
|
||||
public FetcherException(String label) {
|
||||
super(label);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -58,6 +58,9 @@ public class GUI implements AutoCloseable {
|
||||
String localizedMessage = getLocalizedMessage(e);
|
||||
showMessage(e instanceof UserErrorException ? SWT.ICON_WARNING : SWT.ICON_ERROR,
|
||||
getLabel(e instanceof UserErrorException ? "text.userError" : "text.error"), localizedMessage);
|
||||
|
||||
if (!(e instanceof UserErrorException) || e.getCause() != null)
|
||||
new GoogleAnalytics().report(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -70,7 +73,6 @@ public class GUI implements AutoCloseable {
|
||||
messageBox.setText(title);
|
||||
messageBox.setMessage(localizedMessage);
|
||||
messageBox.open();
|
||||
new GoogleAnalytics().report(localizedMessage, (Throwable) null);
|
||||
}
|
||||
|
||||
@Override public void close() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user