Skip to content

Instantly share code, notes, and snippets.

@fredemmott
Created March 11, 2022 22:59
Show Gist options
  • Select an option

  • Save fredemmott/465fb05734afb20e6f6fd59a7d8a807e to your computer and use it in GitHub Desktop.

Select an option

Save fredemmott/465fb05734afb20e6f6fd59a7d8a807e to your computer and use it in GitHub Desktop.
$ 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
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