UiPath Try Catch - Full Tutorial From Start to Finish

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มิ.ย. 2024
  • This UiPath video tutorial shows how to use the Try Catch activity in UiPath. We use the Try Catch to handle exceptions and to do extensive logging. The Try Catch is especially helpful when we create transaction-based workflows (like the UiPath REFramework), and we want the robot to continue when we encounter errors/exceptions.
    📁 Download the course materials: andersjensen.org/try-catch-an...
    You could also watch:
    🎥 UiPath REFramework (1-hour Full Tutorial with extensive exception handling): • UiPath REFramework - F...
    🎥 UiPath Try Catch - an easy guide: • UiPath: Try Catch - an...
    👪 My Facebook Group where we solve UiPath problems and chat around automation in general: / 1817369781750298
    0:00 What is a Try Catch activity in UiPath
    The Try Catch helps us to handle errors and exceptions. It's advantageous when we create transaction-based workflows, just like we do in the UiPath REFramework. Another benefit is that logging is made very easy. Make sure to be active yourself to learn the most. Download the course materials: andersjensen.org/lessons/try-... AND have UiPath open and copy what I do. There is no magic to the Try Catch. In the Try, we put in our chosen activity (/activities). If an exception occurs, we can define, what will happen using the Catch. Typically we write a log message.
    1:28 Try Catch Use Case
    We go through a simple exception handling Try Catch example, where we work with transactions and apply some forced exceptions to go through the different exception types and how we handle them. Read the Excel sheet from the course materials and use a For Each Row to iterate through each transaction. For each transaction, we'll take the data (here just a number) and apply it to the system application (here the Windows calculator).
    8:47 Forcing an Exception
    We force an application exception (selector not found) in order to see, how easily we can handle this with the Try Catch.
    10:18 Try Catch
    Try: We try an activity and if there is an exception, we define what we want to do in the Catch
    Catch: In the Catch we define what we want to when the exception occurs. We can separate each exception type.
    Finally: Activities that will happen, when either the activity runs without exception(s) or an activity has thrown an exception and that has been caught in the Catch.
    15:00 BusinessRuleException
    The Business Rule Exception is used, when we have errors with the data (incomplete like missing a surname, completely missing, outside of boundaries, or general data validation). In this example, we force a BusinessRuleException by making invalid data in one of our transactions.
    18:24 Throw activity
    We can manually throw exceptions as well. Usually, it's done when we validate data and will throw a BusinessRuleException, when something is wrong.
    Connect with me:
    👥 Facebook - / andersjensenorg
    🎮 Discord - / discord
    💼 LinkedIn - / andersjensens
    💌 Email Newsletter - andersjensen.org/email-newsle...
    📷 Instagram - / andersjensenorg
    #uipath #rpa #uipathcommunity
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    We use the Try Catch in the UiPath REFramework (the template to scale our robots, very important you'll learn), when we want to handle exceptions and do good logging. Learn all about it in this 1-hour course: th-cam.com/video/LP5y51_n6BY/w-d-xo.html and have a great day 😊

  • @vs10005
    @vs10005 ปีที่แล้ว

    So clear and simple! Thank you

    • @andersjensenorg
      @andersjensenorg  ปีที่แล้ว

      Thanks a ton, Vincent Schoenfeld 🤩 Have a great day. You're more than welcome at my Discord, where we're 5000+ RPA developers networking and solving problems: th-cam.com/video/xWFz-S96XGo/w-d-xo.html Kind regards, Anders

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

    Very nice. Maybe you can show Retry Scope as well and possibly also explain how to use the two (Retry Scope + Try Catch) in combination.

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

      Hey Bastian. Thank you. And for sure, I will take a note and do that in one of the coming lessons. Have a great wekeend and please continue with this nice feedback. It's helping me a lot. Kind regards, Anders

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

    extremely useful and very technical, thank you very much.

    • @andersjensenorg
      @andersjensenorg  3 ปีที่แล้ว

      Thanks a lot 🙏🙂 Have a great week. Kind regards, Anders

  • @Chilpamma
    @Chilpamma 2 ปีที่แล้ว +1

    Thanks much for the video. It's very helpful. Please post more such videos.

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

      You're very welcome, Shoba H - your support helps me a lot 😍

  • @raviranjansingh9168
    @raviranjansingh9168 ปีที่แล้ว +1

    Very nice explanation 👏

    • @andersjensenorg
      @andersjensenorg  ปีที่แล้ว

      You're very welcome, Ravi Ranjan Singh - your support helps me a lot 😍 You're more than welcome at my Discord, where we're 5300+ RPA developers networking and solving problems: th-cam.com/video/xWFz-S96XGo/w-d-xo.html

  • @user-gx7ut4st9w
    @user-gx7ut4st9w 3 ปีที่แล้ว +1

    Thank you, it is so greate video about try catch!

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

      Hey Анастасия. Nice. Thanks for all your positive comments. Kind regards, Anders

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

    Thanks again, this is the answer to my question before but in different way. Hope there is another video like in scraping. thanks

    • @andersjensenorg
      @andersjensenorg  2 ปีที่แล้ว +1

      Nice! Thanks a lot for writing with the update 🤩

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

    Good example. Exception-handling is common practice for a developer and I really like that you go into details describing the environment, show shortcuts and other techniques. The topic was a bit trivial but then you showed how to make the robot type into the calculator keys dynamically. That was new to me and instead of using the "row" you created a variable and showed how to assign the "row" to it.
    What is the plan with VB? Is it to be replaced with C#?

    • @andersjensenorg
      @andersjensenorg  3 ปีที่แล้ว

      Hey Henrik. Thanks for the feedback 🙂 I agree, it's something (very) standard for a developer. It's my experience, that it's not standard for the common UiPath user. And great with the new learning - I try to go really slow in the videos and teach things/best practices around it/touch other areas. It's a balance though (I should teach the topic, but can mix in a little bit of general knowledge as well).
      I'm not sure. But given that C# is bigger than VB, it might be the case. Luckily for us, it's almost the same.
      Again thanks for the very nice feedback. I hope you will continue in doing so, as it helps me a lot.
      Have a great weekend. Kind regards, Anders
      Ps. Danish? 🙂

  • @vandanachandramohan8592
    @vandanachandramohan8592 ปีที่แล้ว

    Hai. For my current project I want to use the logic of retry scope without using it in try catch and the catch the exceptions in an excel sheet. If this is possible it would be really helpful for my project.

    • @andersjensenorg
      @andersjensenorg  ปีที่แล้ว

      Hey Vandana Chandra Mohan Thanks for writing. I'm getting more than 50 questions/comments every day and having difficulty answering everyone (I try my best). I've created my UiPath Groups, where we all can post and solve problems or hang out around our favorite tool, UiPath. So you're very welcome. Get the addresses here: th-cam.com/video/C6xmGfEL07I/w-d-xo.html Have a great day. Kind regards, Anders

  • @relax_music668
    @relax_music668 ปีที่แล้ว

    try catch里包裹的一个调用的文件调用的文件里还嵌套了另一个调用的文件,如果嵌套的文件异常,能捕获到吗

    • @andersjensenorg
      @andersjensenorg  ปีที่แล้ว

      Hey Excel效率软件 Thanks for writing. I'm getting more than 50 questions/comments every day and having difficulty answering everyone (I try my best). I've created my UiPath Groups, where we all can post and solve problems or hang out around our favorite tool, UiPath. So you're very welcome. Get the addresses here: th-cam.com/video/C6xmGfEL07I/w-d-xo.html Have a great day. Kind regards, Anders

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

    Help me

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

      Hey mark cuello Thanks for writing. I'm getting more than 50 questions/comments every day and having difficulty answering everyone (I try my best). I've created my UiPath Groups, where we all can post and solve problems or hang out around our favorite tool, UiPath. So you're very welcome. Get the addresses here: th-cam.com/video/C6xmGfEL07I/w-d-xo.html Have a great day. Kind regards, Anders

  • @user-jx2pd3fe6k
    @user-jx2pd3fe6k 5 หลายเดือนก่อน

    Putting same name on Excel Column and Sheet is confusing when referring to one of them in the row.item("...") making it not simple for beginners trying to learn UiPath coding...

    • @andersjensenorg
      @andersjensenorg  5 หลายเดือนก่อน

      You're right, I should have made two different names. Thanks a lot 😊