JuMP: Catch error if solver stops early due to network error or running out of memory ?

I am solving a large MILP by calling Gurobi through JuMP v0.18. Gurobi issues an error, which I believe is due to it running out of RAM. Is it possible for JuMP to catch the error and collect the best known solution?

No, not in 0.18.

This might be possible in the new version of JuMP which has better support for this sort of thing.

It would depend on the exact error returned by Gurobi though, and whether Gurobi has a solution internally.