How to use $exception.source$ in Sub Program

How to use $exception.source$ in Sub Program.

We created Parent Programs, A and B(Child).
and we can not create Error logs in B(Sub Program) using Try Catch.

Question: Can we use Variables “$exception.source$” in Sub Program?