Exceptions reorganisiert
parent
a9b700c9c0
commit
68091d3bb8
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package org.hwo.servicelink;
|
||||
package org.hwo.servicelink.exceptions;
|
||||
|
||||
import org.hwo.servicelink.ServiceLinkTelegram;
|
||||
|
||||
public class ServiceLinkRequestFailedException extends ServiceLinkException {
|
||||
|
Loading…
Reference in New Issue