Re: Directory masks -- howto?
Johnathan Burchill <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.dar.general |
|---|---|
| Organization | Department of Physics and Astronomy, University of Calgary |
| Message-ID | <[email protected]> |
On October 15, 2003 11:28 am, Johnathan Burchill wrote:
[...]
By the way, exception handling does not work in either the qt/kde
environment, or with this simple command-line example.
> So here is an example file ("dar-test-create") which reproduces my
> problem.
>
> #include <iostream>
> #include <string>
> #include <libdar.hpp>
> #include <erreurs.hpp>
>
> using namespace std;
> using namespace libdar;
>
> void interaction_warning (const std::string &);
> bool interaction_pause (const std::string &);
>
> int main ( )
> {
> set_warning_callback(&interaction_warning);
> set_answer_callback(&interaction_pause);
>
> user_interaction_warning("Basic program working");
> try
> {
> user_interaction_pause("About to create the archive. Do you wish to
> continue?");
> }
> catch (Euser_abort &e)
> {
Suppose I insert an obvious message here:
cout << "You did the right thing." << endl;
> user_interaction_warning(e.get_message());
> return -1;
> }
Now this never gets printed when I do not continue writing the archive.
The only output is "Aborted".
Am I doing something obviously incorrect here?
BTW, I see in doc/DOC_API that you plan to keep exceptions at the libdar
level only for version 2 of the API. That will allow "no-exception"-built
libraries (default for qt and kde) to link to libdar and not segfault when
the user answers no, right?
Thanks,
JB
[...]
--
Johnathan K. Burchill, Ph.D.
Department of Physics and Astronomy
University of Calgary
2500 University Drive N.W.
Calgary, AB T2N 1N4
Canada
(403) 217-4286
[email protected]
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php