UiPath how to do handle exceptions in REFramework part 2/2 | UiPath Best Practices

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น •

  • @kenchang3456
    @kenchang3456 3 ปีที่แล้ว +3

    These 2 videos were definitely an advantage. Exceptions are always pushed off for later in the development cycle and they always come back to bite you. Proper handling of exceptions saves you a lot of pain later in the development cycle as well as when you've deployed to production. Thank you very much for focusing on this subject.

  • @jxggxr_dxv
    @jxggxr_dxv 2 ปีที่แล้ว

    4:10 - Can't you just use ReThrow activity in the Catch block, after Close Tab? Of course, you'll keep the Close Tab in both (Try & Catch), instead of having it only in Finally, but from a programming perspective, exiting the Catch to handle something is anti-pattern. I get the general idea, and I do agree with it, I just find this particular approach a bit odd.

    • @DanielTila
      @DanielTila  2 ปีที่แล้ว

      Great question! Let's assume you put the Close activity in the Try & Catch block. First question is where you put it? If you put at the end, the exception could occur before and not reach the Close activity. And second, you violate the DRY principle. In this case is just a single instruction, but the method explained in the video you can apply anywhere. The only way you satisfy both conditions is via finally block. is it something which I am missing?