« Return to Thread: Handel failure in sql tag

Handel failure in sql tag

by JMAnt :: Rate this Message:

Reply to Author | View in Thread


I try to connect to sql by ant and do successful.
but if I want give sql connection url from user by input tag
I must check if it is correct or not. but I can't do it. and
if url is incorrect my build job will terminate without any
announcement to user.
If we can handle Exceptions and Error in build file and do some work after
failure?

my related part of build.xml:

                <sql classpath="sql/${jdbc.jar}"
                        driver="${jdbc.driver}"
                        src="${temp.dir}/sqltemp/all.sql"
                        url="jdbc:mysql://${db.hostname}:${db.port}/?autoReconnect=true"
                        userid="${db.username}"
                        password="${db.password}"
                        onerror = "continue"
                        />

 « Return to Thread: Handel failure in sql tag