Description
From #1265 it would seem if some tutorials are broken then the build process still succeeds, this makes sense as some of the tutorials purposefully fail in order to explain compiler errors (see https://ocaml.org/learn/tutorials/common_error_messages.html).
However, it would also be great to have the build fail (or at least a test case) if a toplevel codeblock we expected to work didn't so issues like 1265 are caught at build time and not live on the site!
This issue contains quite a lot of work and perhaps a good starting point is looking at better error reporting during the build phase of the site (somewhere in this file would probably be a good place to start https://github.com/ocaml/ocaml.org/blob/master/script/code_top.ml) but bare in mind that we also want the compiler error message tutorial to still fail, but not break the build.