This commit adds an error-propagating constructor for Action and Function, which makes them usable in the kernel.