How do I throw an Exception with a given backtrace?

found in the julia source code marked a pseudocode:

function throw(val)
     global catch_backtrace = backtrace()
     rethrow(val)
end

Now sure that will work though