get-help about_Functions_CmdletBindingAttribute
Do you want to:
function Foo1 () {
[CmdletBinding ()]
PARAM ()
process {
Write-Host "in Foo1"
Foo2
}
}
This is not about emulation, it means that you really implement common parameters in your function; if that was your intention.
After that you can work as follows:
Foo1 -ErrorAction stop
You can use the same syntax for Foo2 and Foo3 .
To transfer the error to the log, as usual,
source share