Catch loError As Exception lcError = loError.Message lcError = Mid(lcError, 1, lcError.Length - 3) Select Case lcError Case "Bad Data" lcError = "You didn't encrypt the XML string with a valid key." End Select Return lcError End TryIt seems that a dot, a carriage return and another character are by default returned when an exception occurs. Is there a reason for that?