# Suggestion for Exception Handling in Custom Styles and other places

**URL:** <https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208>\
**Category:** WPF\
**Created:** [May 4, 2012, 12:07pm UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208 "2012-05-04T12:07:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@Greg](https://community.thinkgeo.com/u/Greg)\
**Post date:** [May 4, 2012, 12:07pm UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208/1 "2012-05-04T12:07:02Z")

</div>

Hi,

I've&nbsp;noticed&nbsp;that&nbsp;when&nbsp;I&nbsp;have&nbsp;an&nbsp;exception&nbsp;in&nbsp;one&nbsp;of&nbsp;my&nbsp;custom&nbsp;styles,&nbsp;inside&nbsp;the&nbsp;DrawCore&nbsp;override,&nbsp;that&nbsp;the&nbsp;only&nbsp;stack&nbsp;that&nbsp;gets&nbsp;bubbled&nbsp;up&nbsp;looks&nbsp;like&nbsp;this:

System.NullReferenceException:&nbsp;Object&nbsp;reference&nbsp;not&nbsp;set&nbsp;to&nbsp;an&nbsp;instance&nbsp;of&nbsp;an&nbsp;object.&nbsp;  
  
&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.WpfDesktopEdition.Tile.\<\>c\_\_DisplayClass2.\<drawexception\>b\_\_0()&nbsp;  
  
&nbsp;&nbsp;&nbsp;at&nbsp;System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate&nbsp;callback,&nbsp;Object&nbsp;args,&nbsp;Int32&nbsp;numArgs)&nbsp;  
  
&nbsp;&nbsp;&nbsp;at&nbsp;MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object&nbsp;&nbsp;source,&nbsp;Delegate&nbsp;method,&nbsp;Object&nbsp;args,&nbsp;Int32&nbsp;numArgs,&nbsp;Delegate&nbsp;&nbsp;catchHandler)\</drawexception\>

I&nbsp;would&nbsp;like&nbsp;to&nbsp;see&nbsp;more&nbsp;information&nbsp;around&nbsp;the&nbsp;cause&nbsp;of&nbsp;the&nbsp;actual&nbsp;problem&nbsp;in&nbsp;the&nbsp;exception.&nbsp;&nbsp;I&nbsp;suspect&nbsp;that&nbsp;ThinkGeo&nbsp;code&nbsp;is&nbsp;catching&nbsp;the&nbsp;exception&nbsp;and&nbsp;rethrowing&nbsp;a&nbsp;new&nbsp;exception,&nbsp;without&nbsp;settiing&nbsp;the&nbsp;original&nbsp;exception&nbsp;as&nbsp;the&nbsp;InnerException&nbsp;property&nbsp;of&nbsp;the&nbsp;new&nbsp;exception.

I&nbsp;have&nbsp;gone&nbsp;through&nbsp;all&nbsp;of&nbsp;my&nbsp;DrawCore&nbsp;overrides&nbsp;and&nbsp;added&nbsp;a&nbsp;try/catch&nbsp;with&nbsp;a&nbsp;log.error&nbsp;and&nbsp;a&nbsp;rethrow,&nbsp;as&nbsp;a&nbsp;way&nbsp;to&nbsp;work&nbsp;around&nbsp;this&nbsp;problem.&nbsp;&nbsp;But&nbsp;I&nbsp;think&nbsp;it&nbsp;would&nbsp;be&nbsp;cleaner&nbsp;if&nbsp;ThinkGeo&nbsp;gave&nbsp;me&nbsp;more&nbsp;information&nbsp;and&nbsp;I&nbsp;suspect&nbsp;that&nbsp;other&nbsp;customers&nbsp;would&nbsp;like&nbsp;their&nbsp;exceptions&nbsp;to&nbsp;be&nbsp;more&nbsp;descriptive&nbsp;so&nbsp;they&nbsp;realize&nbsp;that&nbsp;their&nbsp;exception&nbsp;is&nbsp;caused&nbsp;by&nbsp;their&nbsp;code&nbsp;and&nbsp;not&nbsp;ThinkGeo&nbsp;code!

I&nbsp;have&nbsp;noticed&nbsp;this&nbsp;type&nbsp;of&nbsp;problem&nbsp;in&nbsp;other&nbsp;areas&nbsp;as&nbsp;well...&nbsp;but&nbsp;I&nbsp;cannot&nbsp;remember&nbsp;the&nbsp;specific&nbsp;cases.

Here&nbsp;are&nbsp;the&nbsp;Microsoft&nbsp;Guidelines&nbsp;for&nbsp;Wrapping&nbsp;Exceptions&nbsp;:&nbsp;msdn.microsoft.com/en-us/library/ms229049.aspx

They&nbsp;state....&nbsp;"Do&nbsp;specify&nbsp;the&nbsp;inner&nbsp;exception&nbsp;when&nbsp;wrapping&nbsp;exceptions.&nbsp;&nbsp;This&nbsp;&nbsp;allows&nbsp;tools&nbsp;to&nbsp;display&nbsp;the&nbsp;underlying&nbsp;details&nbsp;of&nbsp;the&nbsp;problem&nbsp;and&nbsp;can&nbsp;&nbsp;aid&nbsp;in&nbsp;debugging&nbsp;code.&nbsp;...."

Thanks,

Greg

---

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [May 4, 2012, 12:31pm UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208/2 "2012-05-04T12:31:15Z")

</div>

We&nbsp;see&nbsp;this&nbsp;a&nbsp;lot&nbsp;too…&nbsp;&nbsp;not&nbsp;for&nbsp;custom&nbsp;styles&nbsp;but&nbsp;just&nbsp;for&nbsp;random&nbsp;crashes&nbsp;that&nbsp;get&nbsp;logged&nbsp;from&nbsp;our&nbsp;users&nbsp;machines.&nbsp;&nbsp;It’d&nbsp;definitely&nbsp;be&nbsp;nice&nbsp;if&nbsp;we&nbsp;could&nbsp;get&nbsp;more&nbsp;information…

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [May 7, 2012, 5:43pm UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208/3 "2012-05-07T17:43:44Z")

</div>

Hello&nbsp;Greg&nbsp;and&nbsp;Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;the&nbsp;post.&nbsp;Yes&nbsp;we&nbsp;are&nbsp;not&nbsp;the&nbsp;first&nbsp;time&nbsp;met&nbsp;this&nbsp;exception&nbsp;problem,&nbsp;but&nbsp;almost&nbsp;different&nbsp;user&nbsp;has&nbsp;different&nbsp;error&nbsp;reason,&nbsp;so&nbsp;it’s&nbsp;hard&nbsp;to&nbsp;say&nbsp;what’s&nbsp;the&nbsp;root&nbsp;cause&nbsp;just&nbsp;by&nbsp;this&nbsp;error&nbsp;message.&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;will&nbsp;consider&nbsp;sort&nbsp;out&nbsp;all&nbsp;kind&nbsp;of&nbsp;exception&nbsp;and&nbsp;re-check&nbsp;the&nbsp;exception&nbsp;handle&nbsp;logic,&nbsp;thanks&nbsp;for&nbsp;the&nbsp;suggestion.&nbsp;  
&nbsp;&nbsp;  
&nbsp;And&nbsp;if&nbsp;you&nbsp;can&nbsp;recreate&nbsp;this&nbsp;problem&nbsp;with&nbsp;a&nbsp;sample,&nbsp;I&nbsp;think&nbsp;I&nbsp;can&nbsp;debug&nbsp;and&nbsp;reslove&nbsp;it&nbsp;for&nbsp;you.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Greg](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@Greg](https://community.thinkgeo.com/u/Greg)\
**Post date:** [May 18, 2012, 9:29am UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208/4 "2012-05-18T09:29:08Z")

</div>

I'm&nbsp;a&nbsp;bit&nbsp;confused&nbsp;by&nbsp;the&nbsp;ThinkGeo&nbsp;response&nbsp;on&nbsp;this,&nbsp;and&nbsp;I&nbsp;want&nbsp;to&nbsp;keep&nbsp;pushing&nbsp;on&nbsp;this&nbsp;because&nbsp;I&nbsp;find&nbsp;it&nbsp;rather&nbsp;serious.

You&nbsp;state:&nbsp;&nbsp;"but&nbsp;almost&nbsp;different&nbsp;user&nbsp;has&nbsp;different&nbsp;error&nbsp;reason,&nbsp;so&nbsp;it's&nbsp;hard&nbsp;to&nbsp;say&nbsp;what's&nbsp;the&nbsp;root&nbsp;cause&nbsp;just&nbsp;by&nbsp;this&nbsp;error&nbsp;message."

Well...&nbsp;by&nbsp;following&nbsp;the&nbsp;Microsoft&nbsp;guidelines,&nbsp;different&nbsp;users&nbsp;would&nbsp;have&nbsp;an&nbsp;easier&nbsp;time&nbsp;determine&nbsp;the&nbsp;root&nbsp;cause&nbsp;of&nbsp;their&nbsp;exceptions&nbsp;if&nbsp;ThinkGeo&nbsp;didn't&nbsp;"Eat"&nbsp;the&nbsp;exception.&nbsp;&nbsp;Different&nbsp;users&nbsp;need&nbsp;to&nbsp;know&nbsp;if&nbsp;there&nbsp;was&nbsp;an&nbsp;inner&nbsp;exception.&nbsp;&nbsp;I&nbsp;fail&nbsp;to&nbsp;see&nbsp;how&nbsp;the&nbsp;quoted&nbsp;statement&nbsp;above&nbsp;can&nbsp;be&nbsp;used&nbsp;as&nbsp;a&nbsp;possible&nbsp;reason&nbsp;for&nbsp;ThinkGeo's&nbsp;departure&nbsp;from&nbsp;Microsoft&nbsp;guidelines&nbsp;on&nbsp;this&nbsp;in&nbsp;any&nbsp;way...&nbsp;it&nbsp;is&nbsp;actually&nbsp;a&nbsp;reason&nbsp;to&nbsp;follow&nbsp;the&nbsp;guidelines.&nbsp;&nbsp;Am&nbsp;I&nbsp;missing&nbsp;something&nbsp;here?&nbsp;&nbsp;I&nbsp;apoligize&nbsp;if&nbsp;I&nbsp;am,&nbsp;but&nbsp;my&nbsp;opinion&nbsp;is&nbsp;that&nbsp;the&nbsp;way&nbsp;ThinkGeo&nbsp;handles&nbsp;exceptions&nbsp;is&nbsp;a&nbsp;serious&nbsp;problem.&nbsp;&nbsp;Let&nbsp;me&nbsp;tell&nbsp;you&nbsp;why:

1)&nbsp;It&nbsp;takes&nbsp;me&nbsp;and&nbsp;my&nbsp;team&nbsp;more&nbsp;time&nbsp;to&nbsp;fix&nbsp;exceptions.&nbsp;&nbsp;In&nbsp;our&nbsp;application,&nbsp;we&nbsp;log&nbsp;all&nbsp;crashes&nbsp;to&nbsp;a&nbsp;log&nbsp;file.&nbsp;&nbsp;When&nbsp;a&nbsp;customer&nbsp;reports&nbsp;a&nbsp;crash,&nbsp;we&nbsp;get&nbsp;the&nbsp;log&nbsp;file.&nbsp;&nbsp;When&nbsp;we&nbsp;get&nbsp;a&nbsp;crash&nbsp;in&nbsp;our&nbsp;map&nbsp;code,&nbsp;all&nbsp;we&nbsp;see&nbsp;is&nbsp;a&nbsp;vague&nbsp;description&nbsp;because&nbsp;ThinkGeo&nbsp;is&nbsp;not&nbsp;properly&nbsp;wrapping&nbsp;exceptions.&nbsp;&nbsp;And,&nbsp;many&nbsp;of&nbsp;these&nbsp;exceptions&nbsp;are&nbsp;difficult&nbsp;to&nbsp;reproduce&nbsp;because&nbsp;we&nbsp;don't&nbsp;have&nbsp;all&nbsp;the&nbsp;steps.&nbsp;&nbsp;If&nbsp;ThinkGeo&nbsp;properly&nbsp;wrapped&nbsp;the&nbsp;exception&nbsp;as&nbsp;an&nbsp;inner&nbsp;exception,&nbsp;it&nbsp;would&nbsp;take&nbsp;us&nbsp;much&nbsp;less&nbsp;time&nbsp;to&nbsp;fix&nbsp;the&nbsp;bug.&nbsp;&nbsp;This&nbsp;is&nbsp;a&nbsp;CRITICAL&nbsp;issue&nbsp;for&nbsp;us,&nbsp;as&nbsp;we&nbsp;do&nbsp;have&nbsp;customers&nbsp;we&nbsp;want&nbsp;to&nbsp;make&nbsp;happy&nbsp;by&nbsp;providing&nbsp;excellent&nbsp;customer&nbsp;support.&nbsp;&nbsp;&nbsp;Quickly&nbsp;fixing&nbsp;their&nbsp;bugs&nbsp;is&nbsp;CRITICAL.&nbsp;&nbsp;One&nbsp;day&nbsp;of&nbsp;down-time&nbsp;for&nbsp;our&nbsp;customers&nbsp;can&nbsp;cost&nbsp;them&nbsp;hundreds&nbsp;of&nbsp;thousands&nbsp;of&nbsp;dollars.&nbsp;&nbsp;The&nbsp;way&nbsp;ThinkGeo&nbsp;is&nbsp;Eating&nbsp;exceptions&nbsp;and&nbsp;not&nbsp;wrapping&nbsp;exceptions&nbsp;is&nbsp;huge&nbsp;impediment&nbsp;towards&nbsp;us&nbsp;being&nbsp;able&nbsp;to&nbsp;provide&nbsp;top&nbsp;quality&nbsp;customer&nbsp;support.

2)&nbsp;There&nbsp;are&nbsp;a&nbsp;number&nbsp;of&nbsp;places&nbsp;in&nbsp;our&nbsp;map&nbsp;code&nbsp;where&nbsp;we&nbsp;have&nbsp;random&nbsp;try/catch&nbsp;blocks&nbsp;because&nbsp;the&nbsp;perception&nbsp;is&nbsp;that&nbsp;ThinkGeo&nbsp;just&nbsp;randomly&nbsp;crashes.&nbsp;&nbsp;In&nbsp;most&nbsp;of&nbsp;these&nbsp;cases&nbsp;where&nbsp;we&nbsp;did&nbsp;get&nbsp;a&nbsp;crash,&nbsp;we've&nbsp;eventually&nbsp;determined&nbsp;that&nbsp;the&nbsp;exception&nbsp;was&nbsp;caused&nbsp;by&nbsp;something&nbsp;bad&nbsp;we&nbsp;were&nbsp;doing&nbsp;in&nbsp;the&nbsp;code.&nbsp;&nbsp;We&nbsp;determined&nbsp;this&nbsp;by&nbsp;turning&nbsp;on&nbsp;the&nbsp;CLR&nbsp;Exceptions&nbsp;off&nbsp;the&nbsp;Debug-\>Exceptions&nbsp;dialog&nbsp;in&nbsp;Visual&nbsp;Studio.&nbsp;&nbsp;However,&nbsp;&nbsp;at&nbsp;one&nbsp;point,&nbsp;the&nbsp;perception&nbsp;throughout&nbsp;our&nbsp;management&nbsp;chain&nbsp;was&nbsp;that&nbsp;ThinkGeo&nbsp;was&nbsp;not&nbsp;the&nbsp;go-forward&nbsp;direction&nbsp;for&nbsp;us&nbsp;due&nbsp;to&nbsp;seemingly&nbsp;random&nbsp;crashes.&nbsp;&nbsp;We've&nbsp;even&nbsp;researched&nbsp;other&nbsp;alternative&nbsp;products&nbsp;and&nbsp;were&nbsp;extremely&nbsp;close&nbsp;to&nbsp;switching&nbsp;to&nbsp;different&nbsp;vendors.&nbsp;&nbsp;It&nbsp;would&nbsp;be&nbsp;unfortuneate&nbsp;to&nbsp;lose&nbsp;customers&nbsp;due&nbsp;to&nbsp;a&nbsp;perception&nbsp;of&nbsp;bad&nbsp;quality&nbsp;that&nbsp;is&nbsp;driven&nbsp;by&nbsp;something&nbsp;that&nbsp;is&nbsp;easy&nbsp;to&nbsp;address&nbsp;in&nbsp;the&nbsp;code.&nbsp;&nbsp;This&nbsp;is&nbsp;a&nbsp;silly&nbsp;question,&nbsp;but&nbsp;.....&nbsp;&nbsp;&nbsp;Is&nbsp;there&nbsp;a&nbsp;business&nbsp;reason&nbsp;you&nbsp;have&nbsp;for&nbsp;making&nbsp;poor&nbsp;quality&nbsp;in&nbsp;your&nbsp;customer's&nbsp;code&nbsp;appear&nbsp;to&nbsp;be&nbsp;a&nbsp;problem&nbsp;with&nbsp;ThinkGeo&nbsp;code?

In&nbsp;my&nbsp;opinion,&nbsp;I've&nbsp;layed&nbsp;out&nbsp;two&nbsp;pretty&nbsp;strong&nbsp;business&nbsp;arguments&nbsp;for&nbsp;changing&nbsp;how&nbsp;you&nbsp;handle&nbsp;exceptions.&nbsp;&nbsp;&nbsp;Perhaps&nbsp;there&nbsp;is&nbsp;something&nbsp;in&nbsp;your&nbsp;architecture&nbsp;/&nbsp;design&nbsp;that&nbsp;would&nbsp;preclude&nbsp;you&nbsp;from&nbsp;following&nbsp;the&nbsp;guidelines,&nbsp;and&nbsp;if&nbsp;there&nbsp;is,&nbsp;please&nbsp;communicate&nbsp;that&nbsp;with&nbsp;me.&nbsp;&nbsp;Our&nbsp;mapping&nbsp;component&nbsp;is&nbsp;a&nbsp;critical&nbsp;part&nbsp;of&nbsp;our&nbsp;overall&nbsp;solution,&nbsp;and&nbsp;we&nbsp;need&nbsp;for&nbsp;it&nbsp;to&nbsp;be&nbsp;as&nbsp;solid&nbsp;as&nbsp;possible.

-Greg

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![David](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@David](https://community.thinkgeo.com/u/David)\
**Post date:** [May 18, 2012, 9:50am UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208/5 "2012-05-18T09:50:16Z")

</div>

Greg,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;To&nbsp;clear&nbsp;up&nbsp;the&nbsp;confusion&nbsp;on&nbsp;this&nbsp;we&nbsp;will&nbsp;be&nbsp;very&nbsp;clear.&nbsp;&nbsp;We&nbsp;try&nbsp;to&nbsp;never&nbsp;eat&nbsp;exceptions&nbsp;and&nbsp;many&nbsp;times&nbsp;we&nbsp;get&nbsp;complaints&nbsp;from&nbsp;users&nbsp;about&nbsp;this.&nbsp;&nbsp;I&nbsp;am&nbsp;not&nbsp;saying&nbsp;it&nbsp;is&nbsp;not&nbsp;there&nbsp;at&nbsp;ll&nbsp;but&nbsp;that&nbsp;is&nbsp;not&nbsp;the&nbsp;standard&nbsp;we&nbsp;have.&nbsp;&nbsp;When&nbsp;we&nbsp;catch&nbsp;errors&nbsp;and&nbsp;then&nbsp;bubble&nbsp;them&nbsp;up&nbsp;we&nbsp;simply&nbsp;throw&nbsp;them&nbsp;again.&nbsp;&nbsp;I&nbsp;am&nbsp;not&nbsp;sure&nbsp;on&nbsp;your&nbsp;particular&nbsp;issue&nbsp;and&nbsp;I&nbsp;think&nbsp;that&nbsp;is&nbsp;the&nbsp;response&nbsp;from&nbsp;Gary&nbsp;saying&nbsp;that&nbsp;he&nbsp;is&nbsp;not&nbsp;sure&nbsp;the&nbsp;source.&nbsp;&nbsp;Also&nbsp;in&nbsp;the&nbsp;context&nbsp;of&nbsp;the&nbsp;tile&nbsp;and&nbsp;multi&nbsp;threading&nbsp;drawing&nbsp;sometimes&nbsp;the&nbsp;stack&nbsp;is&nbsp;very&nbsp;terse.&nbsp;&nbsp;What&nbsp;we&nbsp;can&nbsp;do&nbsp;is&nbsp;to&nbsp;search&nbsp;the&nbsp;entire&nbsp;core&nbsp;and&nbsp;main&nbsp;products&nbsp;for&nbsp;all&nbsp;traces&nbsp;of&nbsp;exceptions&nbsp;and&nbsp;make&nbsp;sure&nbsp;that&nbsp;we&nbsp;are&nbsp;including&nbsp;the&nbsp;inner&nbsp;exceptions&nbsp;if&nbsp;applicable.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;David

---

<div class="post-metadata">

**Author:** ![Greg](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@Greg](https://community.thinkgeo.com/u/Greg)\
**Post date:** [May 18, 2012, 10:07am UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208/6 "2012-05-18T10:07:32Z")

</div>

Thank&nbsp;you&nbsp;for&nbsp;the&nbsp;response&nbsp;David.

-Greg

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [May 21, 2012, 1:58am UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208/7 "2012-05-21T01:58:32Z")

</div>

Hello&nbsp;Greg,&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;are&nbsp;welcome,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know&nbsp;your&nbsp;questions.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary

---

<div class="post-metadata">

**Author:** ![Piotr\_Czabanski](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/piotr_czabanski/32/19362_2.png) [@Piotr\_Czabanski](https://community.thinkgeo.com/u/Piotr_Czabanski)\
**Post date:** [March 1, 2018, 7:39pm UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208/8 "2018-03-01T19:39:45Z")

</div>

Example: put the null into feature.ColumnValues[“XX”]=null and then map.Refresh() - I suppose you can point the feature by its Id but all what we get is null exception with no additional information.

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [March 2, 2018, 3:17am UTC](https://community.thinkgeo.com/t/suggestion-for-exception-handling-in-custom-styles-and-other-places/3208/9 "2018-03-02T03:17:45Z")

</div>

Hi Piotr\_Czabanski,

It looks I don’t understand your reply about this problem, does it a share or you also have question about it?

Regards,

Ethan
