Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: exception handling for http (Read 3232 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

exception handling for http

I'm not sure if this is my wrong usage for the exception handling of http filesystem, but I think most likely it is a bug, because it doesn't happen for file://, just http://

Code: [Select]
    try
    {
        input_open_file_helper(p_filehint, "http://www.just-something.com/file.mp3", input_open_info_read, p_abort);
    }
    catch (exception e)
    {
          .......................
          .......................
    }

whatever you put in catch block will get a crash, as long as an exception is thrown.
the reason is corruption of heap, anybody can confirm this?

exception handling for http

Reply #1
Try changing that catch clause to the following:
Code: [Select]
catch (exception const & e)

 

exception handling for http

Reply #2
thank you, this is it.