diff --git a/NTwain/Data/TwainTypesExtended.cs b/NTwain/Data/TwainTypesExtended.cs
index f53fc98..f317288 100644
--- a/NTwain/Data/TwainTypesExtended.cs
+++ b/NTwain/Data/TwainTypesExtended.cs
@@ -949,7 +949,7 @@ namespace NTwain.Data
}
break;
case ContainerType.Range:
- for (var i = read.RangeMinValue; i <= read.RangeMaxValue; i += read.RangeStepSize)
+ for (var i = read.RangeMinValue; i >= read.RangeMinValue && i <= read.RangeMaxValue; i += read.RangeStepSize)
{
toPopulate.Add(i);
}
@@ -1390,7 +1390,10 @@ namespace NTwain.Data
///
public sealed partial class TWExtImageInfo : IDisposable
{
- internal TWExtImageInfo()
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public TWExtImageInfo()
{
_info = new TWInfo[200];
}
diff --git a/NTwain/TwainSession.cs b/NTwain/TwainSession.cs
index b66711e..a22bba4 100644
--- a/NTwain/TwainSession.cs
+++ b/NTwain/TwainSession.cs
@@ -18,7 +18,7 @@ namespace NTwain
///
/// Basic class for interfacing with TWAIN. You should only have one of this per application process.
///
- public partial class TwainSession
+ public partial class TwainSession
{
///
/// Initializes a new instance of the class.
@@ -71,7 +71,7 @@ namespace NTwain
}
return source;
}
-
+
#region ITwainSession Members
@@ -421,7 +421,10 @@ namespace NTwain
var hand = PropertyChanged;
if (hand != null) { hand(this, new PropertyChangedEventArgs(propertyName)); }
}
- catch { }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("PropertyChanged event error: " + ex.ToString());
+ }
}
else
{
@@ -432,7 +435,10 @@ namespace NTwain
var hand = PropertyChanged;
if (hand != null) { hand(this, new PropertyChangedEventArgs(propertyName)); }
}
- catch { }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("PropertyChanged event error: " + ex.ToString());
+ }
}, null);
}
}
@@ -486,7 +492,10 @@ namespace NTwain
onEventFunc();
if (handler != null) { handler(this, EventArgs.Empty); }
}
- catch { }
+ catch (Exception ex)
+ {
+ Debug.WriteLine(handler.Method.Name + " event error: " + ex.ToString());
+ }
}
else
{
@@ -497,7 +506,10 @@ namespace NTwain
onEventFunc();
if (handler != null) { handler(this, EventArgs.Empty); }
}
- catch { }
+ catch (Exception ex)
+ {
+ Debug.WriteLine(handler.Method.Name + " event error: " + ex.ToString());
+ }
}, null);
}
}
@@ -522,7 +534,10 @@ namespace NTwain
onEventFunc(e);
if (handler != null) { handler(this, e); }
}
- catch { }
+ catch (Exception ex)
+ {
+ Debug.WriteLine(handler.Method.Name + " event error: " + ex.ToString());
+ }
}
else
{
@@ -535,7 +550,10 @@ namespace NTwain
onEventFunc(e);
if (handler != null) { handler(this, e); }
}
- catch { }
+ catch (Exception ex)
+ {
+ Debug.WriteLine(handler.Method.Name + " event error: " + ex.ToString());
+ }
}, null);
}
}