Consider the following snippet:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
namespace ForumLogins {
public class VBULLETIN {
HttpWebRequest request;
public void ForumLogins(string url) {
request = (HttpWebRequest)WebRequest.Create(url);
}
}
}
According to MSDN the "Create" method can return 4 exceptions. Now I cant dissolve those exceptions.. because well otherwise the class wont function. But what should I do? Should I still wrap it in a try/catch block? and in the catch "throw a new exception".. or let the person who implments this class handle the exceptions?
Cuz this is a constructor .. and I guess constructors arnt really supposed to fail?