UiPath Try Catch - Full Tutorial From Start to Finish

  Рет қаралды 18,300

Anders Jensen

Anders Jensen

Күн бұрын

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 жыл бұрын
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: kzfaq.info/get/bejne/grZlrJhixNSaco0.html and have a great day 😊
@bastian6173
@bastian6173 3 жыл бұрын
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 жыл бұрын
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
@Chilpamma
@Chilpamma 2 жыл бұрын
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 Жыл бұрын
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: kzfaq.info/get/bejne/rr12rZCEnpy8d6M.html
@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: kzfaq.info/get/bejne/rr12rZCEnpy8d6M.html Kind regards, Anders
@henrikcarlsen1881
@henrikcarlsen1881 3 жыл бұрын
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? 🙂
@aprendiendorpauipath2759
@aprendiendorpauipath2759 3 жыл бұрын
extremely useful and very technical, thank you very much.
@andersjensenorg
@andersjensenorg 3 жыл бұрын
Thanks a lot 🙏🙂 Have a great week. 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 жыл бұрын
Nice! Thanks a lot for writing with the update 🤩
@user-gx7ut4st9w
@user-gx7ut4st9w 3 жыл бұрын
Thank you, it is so greate video about try catch!
@andersjensenorg
@andersjensenorg 3 жыл бұрын
Hey Анастасия. Nice. Thanks for all your positive comments. Kind regards, Anders
@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: kzfaq.info/get/bejne/eZyooKqXqrKUZ30.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: kzfaq.info/get/bejne/eZyooKqXqrKUZ30.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 😊
@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: kzfaq.info/get/bejne/eZyooKqXqrKUZ30.html Have a great day. Kind regards, Anders
UiPath: How to Extract Outlook Emails with Regex (Full Use Case)
39:09
UI Elements and Selectors in Power Automate Desktop - Full Tutorial
37:22
The Worlds Most Powerfull Batteries !
00:48
Woody & Kleiny
Рет қаралды 17 МЛН
Throw and Rethrow in UiPath | Error Handling in UiPath
26:14
Automate with Rakesh
Рет қаралды 44 М.
UiPath: Try Catch - an easy guide
6:32
Anders Jensen
Рет қаралды 24 М.
How To Use Object Repository in UiPath (Tutorial)
27:04
Anders Jensen
Рет қаралды 10 М.
UiPath Global Exception Handler For Easy Explanation
24:46
Automate with Rakesh
Рет қаралды 25 М.
how to download & install AutoHotkey on windows 10 | Amir Tech Info
1:02
Retry Scope in UiPath | How to Use Retry Scope Activity in UiPath
12:27
Automate with Rakesh
Рет қаралды 30 М.
UiPath | How to automate Excel and work with Data Tables | Tutorial
23:47
UiPath Beginners Course 2023 - How to Get Started
1:28:51
Anders Jensen
Рет қаралды 150 М.
Microsoft Copilot: Improve Your Prompts
15:47
Anders Jensen
Рет қаралды 1,5 М.
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 1,4 МЛН
Apple watch hidden camera
0:34
_vector_
Рет қаралды 52 МЛН
How much charging is in your phone right now? 📱➡️ 🔋VS 🪫
0:11
МОЖНО ЛИ заряжать AirPods в чехле 🧐😱🧐 #airpods #applewatch #dyson
0:22
Apple_calls РЕПЛИКА №1 В РФ
Рет қаралды 21 М.