mirror of
https://github.com/zeroflag/fcl.git
synced 2025-01-11 20:01:10 +01:00
improved error msg
This commit is contained in:
parent
04d4310325
commit
a0cc094f05
2 changed files with 4 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
package com.vectron.fcl.exceptions;
|
package com.vectron.fcl.exceptions;
|
||||||
|
|
||||||
public class InterOpFailed extends FclException {
|
public class InterOpFailed extends FclException {
|
||||||
public InterOpFailed(Exception e) {
|
public InterOpFailed(Throwable e) {
|
||||||
super(e);
|
super(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.vectron.fcl.types.Num;
|
||||||
import com.vectron.fcl.types.Obj;
|
import com.vectron.fcl.types.Obj;
|
||||||
import com.vectron.fcl.types.Str;
|
import com.vectron.fcl.types.Str;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -66,6 +67,8 @@ class MethodSpec {
|
||||||
Object result = method.invoke(receiver, params.toArray(new Object[0]));
|
Object result = method.invoke(receiver, params.toArray(new Object[0]));
|
||||||
if (!method.getReturnType().getSimpleName().equals("void"))
|
if (!method.getReturnType().getSimpleName().equals("void"))
|
||||||
processResult(result, stack);
|
processResult(result, stack);
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
throw new InterOpFailed(e.getCause() != null ? e.getCause() : e);
|
||||||
} catch (ReflectiveOperationException e) {
|
} catch (ReflectiveOperationException e) {
|
||||||
throw new InterOpFailed(e);
|
throw new InterOpFailed(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue