Printing Variable into logs gives error - Covert to user code

Ranorex Studio, Spy, Recorder, and Driver.
gsb
Posts: 23
Joined: Wed Mar 17, 2021 3:49 pm

Printing Variable into logs gives error - Covert to user code

Post by gsb » Wed Apr 07, 2021 4:44 pm

'CreateLoan.Get_value(RepoItemInfo)': not all code paths return a value (CS0161) -

have converted the user code, 1st saved and assigned on the run that value into variable then next step was Convert to user code.

Is it the best approach for print captured value from variable
You do not have the required permissions to view the files attached to this post.

User avatar
vseaver
Certified Professional
Certified Professional
Posts: 16
Joined: Tue Jan 19, 2021 5:24 pm
Location: Colorado, US

Re: Printing Variable into logs gives error - Covert to user code

Post by vseaver » Wed Apr 07, 2021 11:55 pm

Hi gsb,

It sounds like the compiler actually doesn't like something in your code. the error that's being thrown "not all code paths return a value" indicates you are missing a return on your logic. With out seeing your code its hard to tell but please reference this post on stack overflow.

https://stackoverflow.com/questions/211 ... rn-a-value
Sales Engineer @ Ranorex

gsb
Posts: 23
Joined: Wed Mar 17, 2021 3:49 pm

Re: Printing Variable into logs gives error - Covert to user code

Post by gsb » Thu Apr 08, 2021 12:18 am

Thanks @vseaver

Got it worked, problem was in the repository , had to change the regex into the repository and it worked :) thanks for reaching out bro.
added the attachment and solution i did.
You do not have the required permissions to view the files attached to this post.

User avatar
vseaver
Certified Professional
Certified Professional
Posts: 16
Joined: Tue Jan 19, 2021 5:24 pm
Location: Colorado, US

Re: Printing Variable into logs gives error - Covert to user code

Post by vseaver » Thu Apr 15, 2021 1:44 am

Hell yeah, glad you got it working!
Sales Engineer @ Ranorex