Home Forums SQL Server 2005 T-SQL (SS2K5) RAISERROR in TRY/Catch block after XML Schema Collection Validation. RE: RAISERROR in TRY/Catch block after XML Schema Collection Validation.

  • Hit Matt,

    Thanks for you feedback.

    Actually yes, I am already doing that in my Unit Test for the from as shown below, but still no luck

    --Set the values for the Input variables

    DECLARE @EmpXML XML = 'Test',

    @ErrorMsg varchar(200)

    BEGIN TRY

    EXEC @rc = dbo.ImportEmployeeInfo

    @EmployeeXML = @EmpXML

    END TRY

    BEGIN CATCH

    SELECT @Error = ERROR_MESSAGE()

    END CATCH

    SELECT @Error AS Error