New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom-Function, unclear Exception-Message #84

Closed
krguse opened this Issue Mar 14, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@krguse

krguse commented Mar 14, 2016

My custom-function returned in function execute(..) null instead of a string-instance.

Got following exception-message
FAILURE: Caused by: NoSuchFunctionException: Function: …. could not be found

I think this exception-message is not correct. Maybe an Message like “function did return NULL” would be more helpful.

@vdsrd

This comment has been minimized.

Contributor

vdsrd commented Mar 14, 2016

Are you sure that, your custom function is really executed. First check your configuration and look in citrus-context.xml if the custom function is configured correctly there, and if yes put a break point in your custom function and check if it is really executed.

Best regards
Tamer

From: krguse [mailto:notifications@github.com]
Sent: Monday, March 14, 2016 15:33
To: christophd/citrus citrus@noreply.github.com
Subject: [citrus] Custom-Function, unclear Exception-Message (#84)

My custom-function returned in function execute(..) null instead of a string-instance.

Got following exception-message
FAILURE: Caused by: NoSuchFunctionException: Function: …. could not be found

I think this exception-message is not correct. Maybe an Message like “function did return NULL” would be more helpful.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84.

@krguse

This comment has been minimized.

krguse commented Mar 14, 2016

Hi Tamer,

thanks for your quick response.

And yes I am sure that everything is correctly configured.

Changing my return-value from

return null;

to

return “”;

let the exception disappear and everything is running fine.

The exception “NoSuchFunctionException” sounds a little bit like reflection. I assume that the returned value is analyzed and because null is not a valid string-instance (not the correct class) the analyzer is “confused” .

Please try to reproduce it.

Kind Regards
Kai

Von: vdsrd [mailto:notifications@github.com]
Gesendet: Montag, 14. März 2016 3:39
An: christophd/citrus
Cc: Guse, Kai-Rasmus
Betreff: Re: [citrus] Custom-Function, unclear Exception-Message (#84)

Are you sure that, your custom function is really executed. First check your configuration and look in citrus-context.xml if the custom function is configured correctly there, and if yes put a break point in your custom function and check if it is really executed.

Best regards
Tamer

From: krguse [mailto:notifications@github.com]
Sent: Monday, March 14, 2016 15:33
To: christophd/citrus <citrus@noreply.github.commailto:citrus@noreply.github.com>
Subject: [citrus] Custom-Function, unclear Exception-Message (#84)

My custom-function returned in function execute(..) null instead of a string-instance.

Got following exception-message
FAILURE: Caused by: NoSuchFunctionException: Function: …. could not be found

I think this exception-message is not correct. Maybe an Message like “function did return NULL” would be more helpful.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84#issuecomment-196340195.

@vdsrd

This comment has been minimized.

Contributor

vdsrd commented Mar 14, 2016

OK, I could also reproduce the issue. Yes you are right, the exception is misleading.

Kind regards
Tamer

From: krguse [mailto:notifications@github.com]
Sent: Monday, March 14, 2016 15:47
To: christophd/citrus citrus@noreply.github.com
Cc: vdsrd vdsrd@vasco.com
Subject: Re: [citrus] Custom-Function, unclear Exception-Message (#84)

Hi Tamer,

thanks for your quick response.

And yes I am sure that everything is correctly configured.

Changing my return-value from

return null;

to

return “”;

let the exception disappear and everything is running fine.

The exception “NoSuchFunctionException” sounds a little bit like reflection. I assume that the returned value is analyzed and because null is not a valid string-instance (not the correct class) the analyzer is “confused” .

Please try to reproduce it.

Kind Regards
Kai

Von: vdsrd [mailto:notifications@github.com]
Gesendet: Montag, 14. März 2016 3:39
An: christophd/citrus
Cc: Guse, Kai-Rasmus
Betreff: Re: [citrus] Custom-Function, unclear Exception-Message (#84)

Are you sure that, your custom function is really executed. First check your configuration and look in citrus-context.xml if the custom function is configured correctly there, and if yes put a break point in your custom function and check if it is really executed.

Best regards
Tamer

From: krguse [mailto:notifications@github.com]
Sent: Monday, March 14, 2016 15:33
To: christophd/citrus <citrus@noreply.github.com<mailto:citrus@noreply.github.commailto:citrus@noreply.github.com%3cmailto:citrus@noreply.github.com>>
Subject: [citrus] Custom-Function, unclear Exception-Message (#84)

My custom-function returned in function execute(..) null instead of a string-instance.

Got following exception-message
FAILURE: Caused by: NoSuchFunctionException: Function: …. could not be found

I think this exception-message is not correct. Maybe an Message like “function did return NULL” would be more helpful.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84#issuecomment-196340195.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84#issuecomment-196345270.

@krguse

This comment has been minimized.

krguse commented Mar 14, 2016

Hi Tamer,

Thanks ;-)

Kind Regards
Kai

Von: vdsrd [mailto:notifications@github.com]
Gesendet: Montag, 14. März 2016 3:57
An: christophd/citrus
Cc: Guse, Kai-Rasmus
Betreff: Re: [citrus] Custom-Function, unclear Exception-Message (#84)

OK, I could also reproduce the issue. Yes you are right, the exception is misleading.

Kind regards
Tamer

From: krguse [mailto:notifications@github.com]
Sent: Monday, March 14, 2016 15:47
To: christophd/citrus <citrus@noreply.github.commailto:citrus@noreply.github.com>
Cc: vdsrd <vdsrd@vasco.commailto:vdsrd@vasco.com>
Subject: Re: [citrus] Custom-Function, unclear Exception-Message (#84)

Hi Tamer,

thanks for your quick response.

And yes I am sure that everything is correctly configured.

Changing my return-value from

return null;

to

return “”;

let the exception disappear and everything is running fine.

The exception “NoSuchFunctionException” sounds a little bit like reflection. I assume that the returned value is analyzed and because null is not a valid string-instance (not the correct class) the analyzer is “confused” .

Please try to reproduce it.

Kind Regards
Kai

Von: vdsrd [mailto:notifications@github.com]
Gesendet: Montag, 14. März 2016 3:39
An: christophd/citrus
Cc: Guse, Kai-Rasmus
Betreff: Re: [citrus] Custom-Function, unclear Exception-Message (#84)

Are you sure that, your custom function is really executed. First check your configuration and look in citrus-context.xml if the custom function is configured correctly there, and if yes put a break point in your custom function and check if it is really executed.

Best regards
Tamer

From: krguse [mailto:notifications@github.com]
Sent: Monday, March 14, 2016 15:33
To: christophd/citrus <citrus@noreply.github.com<mailto:citrus@noreply.github.com<mailto:citrus@noreply.github.com%3cmailto:citrus@noreply.github.commailto:citrus@noreply.github.com%3cmailto:citrus@noreply.github.com%3cmailto:citrus@noreply.github.com%3cmailto:citrus@noreply.github.com>>>
Subject: [citrus] Custom-Function, unclear Exception-Message (#84)

My custom-function returned in function execute(..) null instead of a string-instance.

Got following exception-message
FAILURE: Caused by: NoSuchFunctionException: Function: …. could not be found

I think this exception-message is not correct. Maybe an Message like “function did return NULL” would be more helpful.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84#issuecomment-196340195.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84#issuecomment-196345270.


Reply to this email directly or view it on GitHubhttps://github.com//issues/84#issuecomment-196351059.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment