Catching a boost error to prevent a crash.