Exceptions reorganisiert

master
Harald Wolff 2016-11-18 10:46:25 +01:00
parent a9b700c9c0
commit 68091d3bb8
4 changed files with 60 additions and 24 deletions

View File

@ -1,23 +0,0 @@
package org.hwo.servicelink;
import java.io.IOException;
public class ServiceLinkException extends Exception {
public ServiceLinkException()
{
}
public ServiceLinkException(String message)
{
super(message);
}
public ServiceLinkException(Throwable e) {
super(e);
}
}

View File

@ -0,0 +1,25 @@
package org.hwo.servicelink.exceptions;
import org.hwo.ByteArrayHelper;
import org.hwo.ByteArrayHexlifier;
import org.hwo.StringHelper;
public class CRCFailedException extends ServiceLinkException {
private byte[] buffer;
public CRCFailedException(byte[] buffer,String message){
super(message);
this.buffer = buffer;
}
public byte[] getBuffer() {
return buffer;
}
@Override
public String getDebugMessage() {
return String.format("Failed Buffer is: %s",ByteArrayHexlifier.byteArrayToString(buffer));
}
}

View File

@ -0,0 +1,33 @@
package org.hwo.servicelink.exceptions;
import java.io.IOException;
import javax.xml.ws.handler.MessageContext;
import org.hwo.exceptions.ExtendedExceptionBase;
public class ServiceLinkException extends ExtendedExceptionBase {
public ServiceLinkException()
{
super("Unspecific ServiceLink Exception");
}
public ServiceLinkException(String message)
{
super(message);
}
public ServiceLinkException(String message,Throwable cause)
{
super(message,cause);
}
public ServiceLinkException(Throwable e) {
super(e);
}
}

View File

@ -1,5 +1,6 @@
package org.hwo.servicelink;
package org.hwo.servicelink.exceptions;
import org.hwo.servicelink.ServiceLinkTelegram;
public class ServiceLinkRequestFailedException extends ServiceLinkException {