Added getMessage() method for custom messages.