Function in Application 1
string userDetails.getCompany(string e)
{
x = "ERROR";
company = User [Email == e];
info company;
if(company.count(Email)==0 || company.count(Email) > 1){
x = "ERROR";
}else{
x = company.Email;
}
return x;
}
Application 2 Calling the function from Application 1
string projectEdits.test(string s)
{
company = user_management.userDetails.getCompany(s);
return company;
}
Results:
If I pass a invalid emailID from Application 2, I get the desired result "ERROR".
If I pass a valid emailID from Application 2, I get an error stating "Error in executing....."
Any one to help