sudo touch /usr/local/Cellar/nimrod/0.11.2/nim/doc/exception_hierarchy_overview.txt sudo touch /usr/local/Cellar/nimrod/0.11.2/nim/doc/astspec.txt
For people searching for this, this was the exact error
lib/system.nim(24, 4) Error: cannot open '../doc/exception_hierarchy_fragment.txt' Error: unhandled exception: lib/system.nim(24, 4) Error: cannot open '../doc/exception_hierarchy_fragment.txt' [ERecoverableError]
Note that this same error would occur if you are using a Nim installation that also did not include these files, so it may happen in other places where Nim is not installed correctly (not just Homebrew installations)
I'm not sure if it makes sense for the doc2 command to provide a better error message on failing includes like this. I can try to sort out a pull request if that would be welcomed.
I don't know if there is anyone on the forums here that work on the Homebrew setup for Nim. If not, I can try to hunt up where to file this as an issue.