Have Nast_eval.static_string return a Result type
commitb538eff7526d7a52218636735e7b9fabd6e4b128
authorJez Ng <jezng@fb.com>
Thu, 14 May 2015 22:41:46 +0000 (14 15:41 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Thu, 14 May 2015 23:00:33 +0000 (14 16:00 -0700)
tree40f1f98878a0008c74cb75fea9a6cea62802de18
parent384c38c0e0971e7cffce18118da75cb484f2c159
Have Nast_eval.static_string return a Result type

Summary: Throwing exceptions is error-prone because OCaml can't
exhaustively verify that you've handled all of them. Indeed, I did miss
a spot, and this resulted in lint crashing on some files. This diff
fixes it and makes the code more type-safe.

Reviewed By: @elgenie

Differential Revision: D2070540
hphp/hack/src/naming/attributes.ml
hphp/hack/src/naming/nast_eval.ml
hphp/hack/src/naming/nast_eval.mli