I'm not sure that a button for search is the right way to go; it would work, definitely, but at the cost of cluttering your UI. Insertion into copy is probably a better idea, because you may be emailing the error message to a systems administrator instead of searching it.
Nice item for a future GUI wishlist.