How to get Exception source “Activity Description name”












0















When exceptions occur in a UIPath project I have an email that is sent out with the exception info included. There seems to be an issue though where I can only see where the error occured by looking at the selector information such as:



Cannot find the UI element corresponding to this selector: 
<html app='chrome.exe' title='Microsoft Dynamics GP' />
<webctrl aaname='Add' idx='1'
parentid='a00000000000000008549000000030009000000000001000000000000' tag='DIV' />


This info and the stack trace or any other info is not really helpful for quickly finding the source of the problem. I have looked through the UIPath documentation and forum and found only the this question, which seemed to point to using the exception.Source to show the name of the activity where the error occurred. exception.Source only returns “UiPath.Core.Activities” though instead of "Type into Copy Job# 'INPUT'" in the following example:



exception issue



This obviously causes a big problem with exception handling. How can I easily return the source with each exception?










share|improve this question



























    0















    When exceptions occur in a UIPath project I have an email that is sent out with the exception info included. There seems to be an issue though where I can only see where the error occured by looking at the selector information such as:



    Cannot find the UI element corresponding to this selector: 
    <html app='chrome.exe' title='Microsoft Dynamics GP' />
    <webctrl aaname='Add' idx='1'
    parentid='a00000000000000008549000000030009000000000001000000000000' tag='DIV' />


    This info and the stack trace or any other info is not really helpful for quickly finding the source of the problem. I have looked through the UIPath documentation and forum and found only the this question, which seemed to point to using the exception.Source to show the name of the activity where the error occurred. exception.Source only returns “UiPath.Core.Activities” though instead of "Type into Copy Job# 'INPUT'" in the following example:



    exception issue



    This obviously causes a big problem with exception handling. How can I easily return the source with each exception?










    share|improve this question

























      0












      0








      0








      When exceptions occur in a UIPath project I have an email that is sent out with the exception info included. There seems to be an issue though where I can only see where the error occured by looking at the selector information such as:



      Cannot find the UI element corresponding to this selector: 
      <html app='chrome.exe' title='Microsoft Dynamics GP' />
      <webctrl aaname='Add' idx='1'
      parentid='a00000000000000008549000000030009000000000001000000000000' tag='DIV' />


      This info and the stack trace or any other info is not really helpful for quickly finding the source of the problem. I have looked through the UIPath documentation and forum and found only the this question, which seemed to point to using the exception.Source to show the name of the activity where the error occurred. exception.Source only returns “UiPath.Core.Activities” though instead of "Type into Copy Job# 'INPUT'" in the following example:



      exception issue



      This obviously causes a big problem with exception handling. How can I easily return the source with each exception?










      share|improve this question














      When exceptions occur in a UIPath project I have an email that is sent out with the exception info included. There seems to be an issue though where I can only see where the error occured by looking at the selector information such as:



      Cannot find the UI element corresponding to this selector: 
      <html app='chrome.exe' title='Microsoft Dynamics GP' />
      <webctrl aaname='Add' idx='1'
      parentid='a00000000000000008549000000030009000000000001000000000000' tag='DIV' />


      This info and the stack trace or any other info is not really helpful for quickly finding the source of the problem. I have looked through the UIPath documentation and forum and found only the this question, which seemed to point to using the exception.Source to show the name of the activity where the error occurred. exception.Source only returns “UiPath.Core.Activities” though instead of "Type into Copy Job# 'INPUT'" in the following example:



      exception issue



      This obviously causes a big problem with exception handling. How can I easily return the source with each exception?







      automation uipath






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 27 '18 at 21:48









      MUlfertsMUlferts

      7391819




      7391819
























          1 Answer
          1






          active

          oldest

          votes


















          1














          When your selector fails, you will end up with a new object of type UiPath.Core.SelectorNotFoundException. However, until the team at UiPath decides to add the Display Name into the inner exception, there is little you can do in this particular case.



          Take the following example - the first line shows the Inner Exception, and the second one in red is essentially just the exception being rethrown. Note that only the latter one contains the Display Name property.



          Output Window



          The Source itself will usually be of type UiPath.Core.Activities, but since this is just the type's name, we don't have any link to the faulting object. Here's what you can do:




          1. Add some details to your exception. You don't want to do this for each activity, but you could have certain blocks of try-catches (example: logging into the system consists of three individual activites, and they reside in one block). Exception Details

          2. Rethrow the exception. That way the Display Name will end up in the execution log file.






          share|improve this answer
























          • Ok, that is a nice trick to know. This helps for being able to at least review logs to find exactly where the error happened since I was already rethrowing errors. It would really be nice if UIPath provided this error detail so that I could easily email myself everything. Either way, this will work for an alternate way to find the issue. Thanks.

            – MUlferts
            Dec 6 '18 at 21:38











          • @MUlferts - Submit an idea! - forum.uipath.com/c/user-voice/ideas

            – codemonkee
            Jan 6 at 8:23











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53508704%2fhow-to-get-exception-source-activity-description-name%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          When your selector fails, you will end up with a new object of type UiPath.Core.SelectorNotFoundException. However, until the team at UiPath decides to add the Display Name into the inner exception, there is little you can do in this particular case.



          Take the following example - the first line shows the Inner Exception, and the second one in red is essentially just the exception being rethrown. Note that only the latter one contains the Display Name property.



          Output Window



          The Source itself will usually be of type UiPath.Core.Activities, but since this is just the type's name, we don't have any link to the faulting object. Here's what you can do:




          1. Add some details to your exception. You don't want to do this for each activity, but you could have certain blocks of try-catches (example: logging into the system consists of three individual activites, and they reside in one block). Exception Details

          2. Rethrow the exception. That way the Display Name will end up in the execution log file.






          share|improve this answer
























          • Ok, that is a nice trick to know. This helps for being able to at least review logs to find exactly where the error happened since I was already rethrowing errors. It would really be nice if UIPath provided this error detail so that I could easily email myself everything. Either way, this will work for an alternate way to find the issue. Thanks.

            – MUlferts
            Dec 6 '18 at 21:38











          • @MUlferts - Submit an idea! - forum.uipath.com/c/user-voice/ideas

            – codemonkee
            Jan 6 at 8:23
















          1














          When your selector fails, you will end up with a new object of type UiPath.Core.SelectorNotFoundException. However, until the team at UiPath decides to add the Display Name into the inner exception, there is little you can do in this particular case.



          Take the following example - the first line shows the Inner Exception, and the second one in red is essentially just the exception being rethrown. Note that only the latter one contains the Display Name property.



          Output Window



          The Source itself will usually be of type UiPath.Core.Activities, but since this is just the type's name, we don't have any link to the faulting object. Here's what you can do:




          1. Add some details to your exception. You don't want to do this for each activity, but you could have certain blocks of try-catches (example: logging into the system consists of three individual activites, and they reside in one block). Exception Details

          2. Rethrow the exception. That way the Display Name will end up in the execution log file.






          share|improve this answer
























          • Ok, that is a nice trick to know. This helps for being able to at least review logs to find exactly where the error happened since I was already rethrowing errors. It would really be nice if UIPath provided this error detail so that I could easily email myself everything. Either way, this will work for an alternate way to find the issue. Thanks.

            – MUlferts
            Dec 6 '18 at 21:38











          • @MUlferts - Submit an idea! - forum.uipath.com/c/user-voice/ideas

            – codemonkee
            Jan 6 at 8:23














          1












          1








          1







          When your selector fails, you will end up with a new object of type UiPath.Core.SelectorNotFoundException. However, until the team at UiPath decides to add the Display Name into the inner exception, there is little you can do in this particular case.



          Take the following example - the first line shows the Inner Exception, and the second one in red is essentially just the exception being rethrown. Note that only the latter one contains the Display Name property.



          Output Window



          The Source itself will usually be of type UiPath.Core.Activities, but since this is just the type's name, we don't have any link to the faulting object. Here's what you can do:




          1. Add some details to your exception. You don't want to do this for each activity, but you could have certain blocks of try-catches (example: logging into the system consists of three individual activites, and they reside in one block). Exception Details

          2. Rethrow the exception. That way the Display Name will end up in the execution log file.






          share|improve this answer













          When your selector fails, you will end up with a new object of type UiPath.Core.SelectorNotFoundException. However, until the team at UiPath decides to add the Display Name into the inner exception, there is little you can do in this particular case.



          Take the following example - the first line shows the Inner Exception, and the second one in red is essentially just the exception being rethrown. Note that only the latter one contains the Display Name property.



          Output Window



          The Source itself will usually be of type UiPath.Core.Activities, but since this is just the type's name, we don't have any link to the faulting object. Here's what you can do:




          1. Add some details to your exception. You don't want to do this for each activity, but you could have certain blocks of try-catches (example: logging into the system consists of three individual activites, and they reside in one block). Exception Details

          2. Rethrow the exception. That way the Display Name will end up in the execution log file.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 4 '18 at 21:34









          Wolfgang RadlWolfgang Radl

          1,24721015




          1,24721015













          • Ok, that is a nice trick to know. This helps for being able to at least review logs to find exactly where the error happened since I was already rethrowing errors. It would really be nice if UIPath provided this error detail so that I could easily email myself everything. Either way, this will work for an alternate way to find the issue. Thanks.

            – MUlferts
            Dec 6 '18 at 21:38











          • @MUlferts - Submit an idea! - forum.uipath.com/c/user-voice/ideas

            – codemonkee
            Jan 6 at 8:23



















          • Ok, that is a nice trick to know. This helps for being able to at least review logs to find exactly where the error happened since I was already rethrowing errors. It would really be nice if UIPath provided this error detail so that I could easily email myself everything. Either way, this will work for an alternate way to find the issue. Thanks.

            – MUlferts
            Dec 6 '18 at 21:38











          • @MUlferts - Submit an idea! - forum.uipath.com/c/user-voice/ideas

            – codemonkee
            Jan 6 at 8:23

















          Ok, that is a nice trick to know. This helps for being able to at least review logs to find exactly where the error happened since I was already rethrowing errors. It would really be nice if UIPath provided this error detail so that I could easily email myself everything. Either way, this will work for an alternate way to find the issue. Thanks.

          – MUlferts
          Dec 6 '18 at 21:38





          Ok, that is a nice trick to know. This helps for being able to at least review logs to find exactly where the error happened since I was already rethrowing errors. It would really be nice if UIPath provided this error detail so that I could easily email myself everything. Either way, this will work for an alternate way to find the issue. Thanks.

          – MUlferts
          Dec 6 '18 at 21:38













          @MUlferts - Submit an idea! - forum.uipath.com/c/user-voice/ideas

          – codemonkee
          Jan 6 at 8:23





          @MUlferts - Submit an idea! - forum.uipath.com/c/user-voice/ideas

          – codemonkee
          Jan 6 at 8:23




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53508704%2fhow-to-get-exception-source-activity-description-name%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)