<div dir="ltr">Exceptions, defined in neutron.extensions are very specific for the code that implements extension.<div>Exceptions defined in neutron.common.exceptions represent common exception classes which are mapped to HTTP error codes.</div>
<div>Also, neutron.common.exceptions contain definitions of exceptions specific to core API</div><div><br></div><div>Thanks,</div><div>Eugene.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Aug 18, 2013 at 7:31 PM, ZhiQiang Fan <span dir="ltr"><<a href="mailto:aji.zqfan@gmail.com" target="_blank">aji.zqfan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">thanks, <span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">Matt Riedemann</span></div>
<div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Sun, Aug 18, 2013 at 9:19 PM, Matt Riedemann <span dir="ltr"><<a href="mailto:mriedem@us.ibm.com" target="_blank">mriedem@us.ibm.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font face="sans-serif">I don't know what's right but for what
it's worth I had cleaned up at least one case like this where the exception
was in both common and an extension:</font>
<br>
<br><a href="https://bugs.launchpad.net/neutron/+bug/1210276" target="_blank"><font size="3" color="blue"><u>https://bugs.launchpad.net/neutron/+bug/1210276</u></font></a><font size="3">
</font>
<br>
<br><font face="sans-serif">Seems to me like if more than one extension
need the same type of exception and the error message can be written such
that it can be re-used across extensions and common code, it should live
in common to avoid duplication.<br>
</font>
<br><font face="sans-serif"><br>
</font>
<br><font size="1" face="Arial">Thanks,</font>
<br>
<br><font size="3" color="#8f8f8f" face="Arial"><b>MATT RIEDEMANN</b></font><font size="1" face="Arial"><br>
Advisory Software Engineer<br>
Cloud Solutions and OpenStack Development</font>
<table width="680" style="border-collapse:collapse">
<tbody><tr height="8">
<td width="680" colspan="2" style="border-style:solid;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px">
<hr>
</td></tr><tr valign="top" height="8">
<td width="418" style="border-style:solid;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px"><font size="1" color="#4181c0" face="Arial"><b>Phone:</b></font><font size="1" color="#5f5f5f" face="Arial">
1-507-253-7622</font><font size="1" color="#4181c0" face="Arial"> | <b>Mobile:</b></font><font size="1" color="#5f5f5f" face="Arial">
1-507-990-1889</font><font size="1" color="#4181c0" face="Arial"><b><br>
E-mail:</b></font><font size="1" color="#5f5f5f" face="Arial"> </font><a href="mailto:mriedem@us.ibm.com" target="_blank"><font size="1" color="#5f5f5f" face="Arial"><u>mriedem@us.ibm.com</u></font></a>
</td><td width="261" style="border-style:solid;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px">
<div align="right"><img src="cid:_1_0BBA94C80BBA8F34004933BE86257BCB" width="83" height="30" alt="IBM"><font size="1" color="#5f5f5f" face="Arial"><br>
<br>
3605 Hwy 52 N<br>
Rochester, MN 55901-1407<br>
United States</font></div></td></tr></tbody></table>
<br>
<br>
<br>
<br>
<br><font size="1" color="#5f5f5f" face="sans-serif">From:      
 </font><font size="1" face="sans-serif">ZhiQiang Fan <<a href="mailto:aji.zqfan@gmail.com" target="_blank">aji.zqfan@gmail.com</a>></font>
<br><font size="1" color="#5f5f5f" face="sans-serif">To:      
 </font><font size="1" face="sans-serif">OpenStack Development
Mailing List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>>, </font>
<br><font size="1" color="#5f5f5f" face="sans-serif">Date:      
 </font><font size="1" face="sans-serif">08/17/2013 09:55 PM</font>
<br><font size="1" color="#5f5f5f" face="sans-serif">Subject:    
   </font><font size="1" face="sans-serif">[openstack-dev]
[Neutron] Exceptions in neutron.extension</font>
<br>
<hr noshade><div><div>
<br>
<br>
<br><font size="3">Hi stackers,</font>
<br>
<br><font size="3">I notice that there are some exceptions defined in neutron.extension,
and many exceptions are defined in neutron.common.exception. Why they are
defined seperately?</font>
<br>
<br><font size="3">In my opinion:</font>
<br>
<br><font size="3">1) extension will define exception which is only releated
to this extension and is intended to exposed to the client</font>
<br><font size="3">2) exception defined in common.exception will be processed
inside neutron, (It may define some exception releated to specific extension
but the exception will be handled inside neutron.)</font>
<br>
<br><font size="3">I think my understanding is not right, so anyone please
help me.</font>
<br>
<br><font size="3">-- </font>
<br><font size="3">blog: </font><a href="http://zqfan.github.com/" target="_blank"><font size="3" color="blue"><u>zqfan.github.com</u></font></a>
<br></div></div><font size="3">git: </font><a href="http://github.com/zqfan" target="_blank"><font size="3" color="blue"><u>github.com/zqfan</u></font></a><tt><font>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
</font></tt><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank"><tt><font>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</font></tt></a><tt><font><br>
</font></tt>
<br><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><div class="im">-- <br><div dir="ltr"><div>blog: <a href="http://zqfan.github.com" target="_blank">zqfan.github.com</a><br></div>git: <a href="http://github.com/zqfan" target="_blank">github.com/zqfan</a><br>

</div>
</div></div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>