Skip to content

Commit e070fea

Browse files
Merge pull request #2 from juneb/master
What does Catch catch?
2 parents 1632c00 + 5a2c1de commit e070fea

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

WhatDoesCatchCatch_20170106.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#Friday Puzzle: What does a Catch block catch?
2+
3+
On Friday, January 6, 2017, I posted the following puzzle on [Twitter](https://twitter.com/juneb_get_help/status/817413653540417538) and [Facebook](https://www.facebook.com/SAPIENTech/photos/a.10151095012027283.433079.82797372282/10154206375342283/?type=3) ([here, too!](https://www.facebook.com/groups/powershell/permalink/1309709699087205/)).
4+
5+
It shows a **Try** block that encloses an expression with an intentional error and a **Catch** block that writes an error. But, when you run it, the error doesn’t appear as designed.
6+
7+
The error is supposed to say ‘Cannot multiply by apple.’ But, it doesn’t. What went wrong here?
8+
9+
10+
![](https://i0.wp.com/www.sapien.com/blog/wp-content/uploads/2017/01/Catch_DollarUnderscore.jpg?ssl=1)
11+
12+
13+
Read the solution: [Friday Puzzle: What does a Catch block catch?](https://www.sapien.com/blog/2017/01/10/friday-puzzle-what-does-a-catch-block-catch/).
14+
15+
16+
----------
17+
Like this PowerShell puzzle?
18+
19+
[This repository](https://github.com/SAPIENTechnologies/FridayPowerShellPuzzle) includes all of the [SAPIEN Technologies](https://sapien.com/blog) Friday PowerShell puzzles.
20+
21+
To read the solutions to our Friday PowerShell Puzzles, see [Friday Puzzle Solutions](https://www.sapien.com/blog/?s=friday+puzzle).

0 commit comments

Comments
 (0)