Printing Variable into logs gives error - Covert to user code

Ranorex Spy, Recorder, and Studio.
gsb
Posts: 17
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
Attachments
Capture.JPG
Capture.JPG (19.74 KiB) Viewed 67 times

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: 17
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.
Attachments
workedit.JPG
workedit.JPG (40.89 KiB) Viewed 59 times

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