can you retrieve what sub called the current one?

NeoTechni

Well-Known Member
Licensed User
Longtime User
The crash logs show the current stack but i dont have access to thosenon other peoples phones

Itd be very helpful if i could popup a messagebox of what sub called the currently running sub when an error occurs
 

mc73

Well-Known Member
Licensed User
Longtime User
you can include a variable and feed it with the calling sub, something like this:
B4X:
sub yourSub(caller as string)
end sub
Call it from another sub:
B4X:
sub anotherSub
yourSub("anotherSub")
end sub
 
Upvote 0

NeoTechni

Well-Known Member
Licensed User
Longtime User
Id prefer not to have to alter the hundred times i call it since b4a doesnt support optional parameters
 
Upvote 0
Top