<commit_before>﻿using System;

namespace Core.Common
{
	public static class ExceptionHelper
	{
		public static void Catch<T> (Action tryAction, Action<Exception> catchAction) where T : Exception
		{
			try {
				tryAction ();
			} catch (T _ex) {
				Exception ex;
				if (_ex is System.Reflection.TargetInvocationException && _ex.InnerException != null)
					ex = _ex.InnerException;
				else
					ex = _ex;
				if (catchAction != null) {
					catchAction (ex);
				}
			}
		}
	}
}

<commit_msg>Update ExceptionHelper.cs<commit_after>﻿using System;

namespace Core.Common
{
	public static class ExceptionHelper
	{
		public static void Catch<T> (Action tryAction, Action<Exception> catchAction) where T : Exception
		{
			try {
				tryAction ();
			} catch (T ex) {
				if (catchAction != null) {
					catchAction (ex);
				}
			} catch (System.Reflection.TargetInvocationException _ex) {
				Exception ex;
				if (_ex.InnerException != null)
					ex = _ex.InnerException;
				else
					ex = _ex;
				if (catchAction != null) {
					catchAction (ex);
				}
			}
		}
	}
}


{'fraction_non_alphanumeric': 0.11007462686567164, 'fraction_numerical': 0.0, 'mean_word_length': 2.8597122302158273, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5920431', 'n_tokens_mistral': 437, 'n_tokens_neox': 345, 'n_words': 90}