Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetEHInfo()

unsafe override void System.Reflection.Emit.DynamicResolver.GetEHInfo ( int excNumber,
void * exc )
inlinepackage

Definition at line 160 of file DynamicResolver.cs.

161 {
162 for (int i = 0; i < m_exceptions.Length; i++)
163 {
164 int numberOfCatches = m_exceptions[i].GetNumberOfCatches();
165 if (excNumber < numberOfCatches)
166 {
167 ((CORINFO_EH_CLAUSE*)exc)->Flags = m_exceptions[i].GetExceptionTypes()[excNumber];
168 ((CORINFO_EH_CLAUSE*)exc)->TryOffset = m_exceptions[i].GetStartAddress();
169 if ((((CORINFO_EH_CLAUSE*)exc)->Flags & 2) != 2)
170 {
171 ((CORINFO_EH_CLAUSE*)exc)->TryLength = m_exceptions[i].GetEndAddress() - ((CORINFO_EH_CLAUSE*)exc)->TryOffset;
172 }
173 else
174 {
175 ((CORINFO_EH_CLAUSE*)exc)->TryLength = m_exceptions[i].GetFinallyEndAddress() - ((CORINFO_EH_CLAUSE*)exc)->TryOffset;
176 }
177 ((CORINFO_EH_CLAUSE*)exc)->HandlerOffset = m_exceptions[i].GetCatchAddresses()[excNumber];
178 ((CORINFO_EH_CLAUSE*)exc)->HandlerLength = m_exceptions[i].GetCatchEndAddresses()[excNumber] - ((CORINFO_EH_CLAUSE*)exc)->HandlerOffset;
179 ((CORINFO_EH_CLAUSE*)exc)->ClassTokenOrFilterOffset = m_exceptions[i].GetFilterAddresses()[excNumber];
180 break;
181 }
182 excNumber -= numberOfCatches;
183 }
184 }

References System.Reflection.Emit.__ExceptionInfo.GetCatchAddresses(), System.Reflection.Emit.__ExceptionInfo.GetCatchEndAddresses(), System.Reflection.Emit.__ExceptionInfo.GetEndAddress(), System.Reflection.Emit.__ExceptionInfo.GetExceptionTypes(), System.Reflection.Emit.__ExceptionInfo.GetFilterAddresses(), System.Reflection.Emit.__ExceptionInfo.GetFinallyEndAddress(), System.Reflection.Emit.__ExceptionInfo.GetNumberOfCatches(), System.Reflection.Emit.__ExceptionInfo.GetStartAddress(), and System.Reflection.Emit.DynamicResolver.m_exceptions.