How to bypass exception and continue the process

146 Views Asked by At

I am running XSLT 2.0 in C# using altova processor like this:

    StreamReader x = new StreamReader(file);
    string y = x.ReadToEnd();
    x.Close();

    string s = TransformByAltovaXML(y, XSLTcontent);
    using (StreamWriter writer = new StreamWriter(tempPath+ "\\" + fileName.Replace(".svg", ".1.svg")))

    {
      writer.Write(s);
      writer.Close();
    }

altove processor by default validate transformed XML files,the problem occurs when the file size become more than 5 MB,it throw an exception and doesn't output the file,personally i don't want the validation to occur but it's built in the altova processor instructions,how "in C#" could i continue to StreamWriter step and ignore that exception ?

0

There are 0 best solutions below