x) Catch more generic IO issues
x) Add a default filename of <unknown> for default created resources
This commit is contained in:
parent
7560e6bf56
commit
065ec3b237
@ -91,7 +91,7 @@ namespace lib
|
||||
|
||||
cfg.SetFilename( filename );
|
||||
}
|
||||
catch( FileNotFoundException )
|
||||
catch( IOException )
|
||||
{
|
||||
Type[] types = new Type[0];
|
||||
object[] parms = new object[0];
|
||||
|
||||
@ -53,10 +53,12 @@ namespace res
|
||||
[Serializable]
|
||||
public class Ref<T>: Ref where T : class
|
||||
{
|
||||
public T res => m_res != null ? m_res : m_res = Mgr.load<T>( filename );
|
||||
|
||||
//For serialization
|
||||
public Ref()
|
||||
public T res => m_res != null ? m_res : m_res = Mgr.load<T>( filename );
|
||||
|
||||
//For serialization
|
||||
public Ref()
|
||||
:
|
||||
base( "<unknown>" )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user