However this method is not secure. Any password that happens to have the same combination of letters as other words in the stack trace can be derived by reading the stack trace. For example, If my username is "administrator" and my password is "admin", my stacktrace would look like this:

authenticate('*****istrator', '*****')

Anyone who reads the stack trace would immediately know the password for administrator is admin.