Here's the scenario:
We've purchased DTSearch search engine.
It ships with a .net api dll that we can add to our project.
Adding this DLL as a new reference, however, kills my project and spits out
a seemingly irrelevant error:
----
C:\Inetpub\wwwroot\userControls\cioPosti
ngDisplay.ascx.vb(58) : error
BC30392: 'Catch' cannot catch type 'exception' because it is not
'System.Exception' or a class that inherits from 'System.Exception'.
C:\Inetpub\wwwroot\userControls\staticCo
ntentDisplay.ascx.vb(106) : error
BC30392: 'Catch' cannot catch type 'exception' because it is not
'System.Exception' or a class that inherits from 'System.Exception'.
C:\Inetpub\wwwroot\userControls\staticCo
ntentDisplay.ascx.vb(108) : error
BC30456: 'Message' is not a member of 'exception'.
C:\Inetpub\wwwroot\userControls\staticCo
ntentDisplay.ascx.vb(108) : error
BC30456: 'Source' is not a member of 'exception'.
----
What are things that could possibly cause this? The vendor (rightfully so)
finds this behavior odd...as do I.
-DarrelIt looks pretty clear to me:
error BC30392: 'Catch' cannot catch type 'exception' because it is not
'System.Exception' or a class that inherits from 'System.Exception'.
Your catch needs to be:
Try
' ... code
Catch(exception As System.Exception)
' ... code
Finally
' ... code
EndCatch
The remaining errors are because you're attempting to access member
properties and methods of System.Exception from a class that isn't derived
from System.Exception. Once you fix your catch statement, the rest ought to
work.
"darrel" wrote:
> Here's the scenario:
> We've purchased DTSearch search engine.
> It ships with a .net api dll that we can add to our project.
> Adding this DLL as a new reference, however, kills my project and spits ou
t
> a seemingly irrelevant error:
> ----
> C:\Inetpub\wwwroot\userControls\cioPosti
ngDisplay.ascx.vb(58) : error
> BC30392: 'Catch' cannot catch type 'exception' because it is not
> 'System.Exception' or a class that inherits from 'System.Exception'.
> C:\Inetpub\wwwroot\userControls\staticCo
ntentDisplay.ascx.vb(106) : error
> BC30392: 'Catch' cannot catch type 'exception' because it is not
> 'System.Exception' or a class that inherits from 'System.Exception'.
> C:\Inetpub\wwwroot\userControls\staticCo
ntentDisplay.ascx.vb(108) : error
> BC30456: 'Message' is not a member of 'exception'.
> C:\Inetpub\wwwroot\userControls\staticCo
ntentDisplay.ascx.vb(108) : error
> BC30456: 'Source' is not a member of 'exception'.
> ----
> What are things that could possibly cause this? The vendor (rightfully so)
> finds this behavior odd...as do I.
> -Darrel
>
>
> Here's the scenario:
> a seemingly irrelevant error:
> ----
> C:\Inetpub\wwwroot\userControls\cioPosti
ngDisplay.ascx.vb(58) : error
> BC30392: 'Catch' cannot catch type 'exception' because it is not
> 'System.Exception' or a class that inherits from 'System.Exception'.
> C:\Inetpub\wwwroot\userControls\staticCo
ntentDisplay.ascx.vb(106) : error
> BC30392: 'Catch' cannot catch type 'exception' because it is not
> 'System.Exception' or a class that inherits from 'System.Exception'.
> C:\Inetpub\wwwroot\userControls\staticCo
ntentDisplay.ascx.vb(108) : error
> BC30456: 'Message' is not a member of 'exception'.
> C:\Inetpub\wwwroot\userControls\staticCo
ntentDisplay.ascx.vb(108) : error
> BC30456: 'Source' is not a member of 'exception'.
> ----
> finds this behavior odd...as do I.
bit late, but first use system.exception instead of plain exception.
if u use Crystal Reports btw, there is your possible problem.
it uses also Exception, dunno why, but they do it
User submitted from AEWNET (http://www.aewnet.com/)
Tuesday, March 13, 2012
troubleshooting conflicting DLL references.
Labels:
adding,
api,
asp,
conflicting,
dll,
dtsearch,
engine,
net,
project,
purchased,
references,
scenariowe,
search,
ships,
troubleshooting
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment