S
Stephane Wirtel
Hi all,
Firstly, Happy New Year
Secondly, I have a c++ source code with many "try catch".
try {
<BODY OF TRY>
}
catch (Exception &pException) {
<BODY OF CATCH (for Exception)>
}
I would like to parse my file and add a 'catch' with std::exception automatically,
to get the next example.
try {
<BODY OF TRY>
}
catch (Exception &pException) {
<BODY OF CATCH (for Exception)>
}
/// New catch added by a ruby script.
catch (std::exception &pException) {
<Fill the body of this catch with the body of catch (for Exception).>
}
How can I do it ? Because I find some problems
1) Try to parse a lot of line with Regexp.
2) In the body of a 'catch', it can contains brackets
Best Regards,
Stephane
Firstly, Happy New Year
Secondly, I have a c++ source code with many "try catch".
try {
<BODY OF TRY>
}
catch (Exception &pException) {
<BODY OF CATCH (for Exception)>
}
I would like to parse my file and add a 'catch' with std::exception automatically,
to get the next example.
try {
<BODY OF TRY>
}
catch (Exception &pException) {
<BODY OF CATCH (for Exception)>
}
/// New catch added by a ruby script.
catch (std::exception &pException) {
<Fill the body of this catch with the body of catch (for Exception).>
}
How can I do it ? Because I find some problems
1) Try to parse a lot of line with Regexp.
2) In the body of a 'catch', it can contains brackets
Best Regards,
Stephane