core: catch module errors and bubble them up the chain.