---
layout: docs
title: endTryBlock
id: class.Facebook.HackCodegen.HackBuilder.endTryBlock
docid: class.Facebook.HackCodegen.HackBuilder.endTryBlock
permalink: /docs/reference/class.Facebook.HackCodegen.HackBuilder.endTryBlock/
---
# Facebook\\HackCodegen\\HackBuilder::endTryBlock()




Strictly equivalent to calling closeBrace, which unindent and newline,
but for readability, you should use this with startTryBlock




``` Hack
public function endTryBlock(): this;
```




## Returns




* ` this `