Differences between revisions 2 and 3
Revision 2 as of 2025-10-24 16:39:20
Size: 507
Comment: Rewrite
Revision 3 as of 2025-10-24 16:52:16
Size: 509
Comment: Rewrite
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
[[https://www.stata.com/manuals/pcapture.pdf|Stata manual for capture]] [[https://www.stata.com/manuals/pcapture.pdf|Stata manual for -capture-]]

Stata Capture

-capture- suppresses output and prevents errors from halting execution, but without overwriting the return code.


Usage

capture assert errors==0
if (_rc!=0) {
  display "There are errors!"
}

To un-suppress output, try capture noisily ....


See also

Stata manual for -capture-


CategoryRicottone

Stata/Capture (last edited 2025-10-24 16:52:16 by DominicRicottone)