Created
March 11, 2022 22:59
-
-
Save fredemmott/465fb05734afb20e6f6fd59a7d8a807e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ hhvm test.hack | |
| Hello, world. | |
| $ echo $? | |
| 0 | |
| $ hhvm test.hack > /dev/full | |
| Fatal error: Uncaught exception 'HH\Lib\OS\ErrnoException' with message 'ENOSPC(28): Errno 28: No space left on device' in /tmp/test.hack:5 | |
| Stack trace: | |
| #0 (): Closure$HH\Lib\_Private\_OS\get_throw_errno_impl#4() | |
| #1 (): HH\Lib\_Private\_OS\throw_errno() | |
| #2 (): HH\Lib\_Private\_OS\wrap_impl() | |
| #3 (): HH\Lib\OS\write() | |
| #4 (): HH\Lib\_Private\_IO\StdioWriteHandle->writeImpl() | |
| #5 (): HH\Lib\_Private\_IO\StdioWriteHandle->writeAllowPartialSuccessAsync() | |
| #6 /tmp/test.hack(5): HH\Lib\_Private\_IO\StdioWriteHandle->writeAllAsync() | |
| #7 (): main() | |
| #8 (): Closure$__SystemLib\enter_async_entry_point() | |
| #9 (): HH\Asio\join() | |
| #10 (): __SystemLib\enter_async_entry_point() | |
| #11 {main} | |
| $ echo $? | |
| 255 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use namespace HH\Lib\IO; | |
| <<__EntryPoint>> | |
| async function main(): Awaitable<void> { | |
| await IO\request_output()->writeAllAsync("Hello, world.\n"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment