Error and Exception Handling Flashcards

1
Q

What are errors?

A

Errors are events that a particular program can’t normally deal with.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the exceptions?

A

Exceptions are events that are recognized (caught) by the program, categorized, and handled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are system exceptions?

A

Exceptions that are generated from System.Exception, so using this generic type in a TryCatch, for example, will catch all types of errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a business exception?

A

A business exception mainly refers to information used in an automated process. Either it may be incomplete or incorrect from a business perspective.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Match following items to Application exceptions and Business exceptions.
1. Data with incorrect product codes
2. Exceptions defined by the developer
3. An error rooted in the fact that certain data is missing or incomplete
4. A project where URL needs to open in a browser and that URL is not responding
5. A project using the variable with no value
6. An error rooted in a technical issue

A
  1. Data with incorrect product codes: Business Exception
  2. Exceptions defined by the developer: Business Exception
  3. An error rooted in the fact that certain data is missing or incomplete: Business Exception
  4. A project where URL needs to open in a browser and that URL is not responding: Application Exception
  5. A project using the variable with no value: Application exception
  6. An error rooted in a technical issue: Application exception
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When will the “Finally” block be executed?

A

The Finally block is only executed when no exceptions are thrown or when an exception is caught and handled in the Catches block (without being re-thrown).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does ‘Rethrow’ do?

A

Rethrow causes the initially thrown exception to be rethrown to handle the exception on an upper level.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Can you use a ‘Rethrow’ activity outside of a ‘Catch’ block?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the use of ‘Throw’ activity?

A

It is used to throw an exception though it is not generated by an activity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

If the caught exception is captured by a both parent exception and a child exception which one will be executed?

A

Th most specific one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the limit as to how many Catches you can use in a Try Catch activity?

A

None

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In which of the following two cases does the Retry Scope retry the contained activities?
1. As long as an error is thrown
2. As long as the condition is met
3. As long as the condition is met and an error is thrown
4. As long as the condition is not met

A
  1. As long as an error is thrown
  2. As long as the condition is not met
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the key difference between TryCatch and Retry Scope?

A

The difference is that Retry Scope activity simply retries the execution instead of providing a more complex handling mechanism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What happens when the value of the ‘Continue on error’ property is blank?

A

It stops the execution while throwing an error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What happens if the ‘Continue on error’ property is set as true on a container activity such as use Browser/application?

A

Then error thrown by all the activities inside the DO container of respective scope Activity will also be ignored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How many Global Exception Handlers a project can have?

A

Only one

17
Q

What happens if the ContinueOnError Property is set to True?
1. The execution of the project continues regardless of any error
2. The execution of the project stops based on the error
3. The execution is retried
4. An error is thrown

A
  1. The execution of the project continues regardless of any error
18
Q

What are the options available for the developer when an error is encountered during an execution?

A
  1. Continue - The exception is re-thrown.
  2. Ignore - The exception is ignored, and the execution continues from the next activity.
  3. Retry - The activity which threw the exception is retried.
  4. Abort - The execution stops after running the current handler.
19
Q

Is Global Exception Handler available to use in library projects?

A

No, only processes

20
Q

The Global Exception Handler has two arguments, errorInfo and result. What are their directions?

A

errorInfo has IN direction and result has OUT direction

21
Q

What is the most effective way to handle the click on a UI Element that is not always available?
1. Place the Click activity inside a Try/Catch block.
2. Use an Element Exists activity and then a Click activity.
3. Use a Find Element Activity.
4. Set the ContinueOnError property of the Click activity to True.

A
  1. Place the Click activity inside a Try/Catch block.
22
Q

You have more than one exception type defined in the Catch block and an exception occurs that fits two types. Which one of the following block is executed?
1. All matching blocks in the order they are defined
2. The block with most generic match
3. The first match defined
4. The block with most specific match

A
  1. The block with most specific match
23
Q

The Retry Scope activity can be used without a termination condition. What does this infer?
1. The Retry Scope Activity retries just once.
2. The Retry Scope Activity retries the activities indefinitely.
3. The Retry Scope Activity retries the activities until no exception occurs (or the provided number of attempts is exceeded).
4. It throws an exception.

A
  1. The Retry Scope Activity retries the activities until no exception occurs (or the provided number of attempts is exceeded).
24
Q

The Global Exception Handler is designed to determine the project’s behavior when encountering an execution error. What is a Global Exception Handler?
1. an activity
2. a menu
3. a property
4. a type of workflow

A
  1. a type of workflow
25
Q

What can you use to make sure that execution continues even if an Activity fails?
1. AddThe DelayAfter property
2. The Throw activity
3. The TimeoutMS property
4. Surround the activity with Try/Catch Activity

A
  1. Surround the activity with Try/Catch Activity
26
Q

Which of the following is recommended to have in a Catch block?
A. An alternative to the approach that fails
B. An Input Dialog activity
C. A LogMessage activity
D. No Activity

A

A. An alternative to the approach that fails
C. A LogMessage activity