If the method is not void you do need to return a value. I can't tell you what to return, it depends completely on what you're doing. Preserving the existing logic of the method you're manipulating would be a good start :)
Jb On Thu, Jan 8, 2015 at 4:41 PM, Reh Gina <[email protected]> wrote: > Ok I'll try to replace ret by leave but what do I have to do in case the > return value of the method is not void? > > Am Donnerstag, 8. Januar 2015 16:35:31 UTC+1 schrieb Jb Evain: >> >> The error means you can not have a ret instruction inside a protected >> block. >> >> It means that if you're injecting protected blocks, you must make sure >> that rets in them are replaced by into leave opcodes, that are jumping >> outside of the protected block where you'll be able to return. >> >> I'm afraid there's nothing built-in for this, you'll have to implement it. >> >> Jb >> >> On Thu, Jan 8, 2015 at 4:27 PM, Reh Gina <[email protected]> wrote: >> > Something with a return which ist not correct in try block, but how to I >> > remove it. Trying this to get work for almost 2 weeks >> > >> > Am Donnerstag, 8. Januar 2015 16:25:13 UTC+1 schrieb Reh Gina: >> >>> >> >>> Now the correct file attached >> > >> > -- >> > -- >> > -- >> > mono-cecil >> > --- >> > You received this message because you are subscribed to the Google >> > Groups >> > "mono-cecil" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an >> > email to [email protected]. >> > For more options, visit https://groups.google.com/d/optout. > > -- > -- > -- > mono-cecil > --- > You received this message because you are subscribed to the Google Groups > "mono-cecil" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- -- mono-cecil --- You received this message because you are subscribed to the Google Groups "mono-cecil" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
