d=C2_L2></a><a href="#C2_L3" id=C2_L3></a><a href="#C2_L4" id=C2_L4></a><a href="#C2_L5" id=C2_L5></a><a href="#C2_L6" id=C2_L6></a><a href="#C2_L7" id=C2_L7></a></span></code></pre>
<p>In the above example, if any of the methods
<code>fetchPhotosOfUsers</code>, <code>applyInstagramFilters</code>, or
<code>uploadTrendyPhotoAlbum</code> returns a promise that rejects,
<code>handleErrors</code> will be called with
the reason for the failure. In this manner, promises approximate an
asynchronous form of try-cat