This is Unity C#
//...
public static void Interupt(int Index, string Text){
try{
Change(Transforms[ Index ], Text);
}
catch{
throw new System.InvalidOperationException("Index: " + Index + " Is too large should be less than: " + Transforms.Count); // points me here
}
}
}
ok this code points me to
throw, ...
how do I make it to point me to line where the function was called?
like:
using UnityEngine;
using System.Collections;
public class TestScript : MonoBehaviour {
void Start(){
SomeClass.Interupt(5, ""); // I want it to point me here
}
}
THO I did try doing:
return throw new System.InvalidOperationException("Index: " + Index + " Is too large should be less than: " + Transforms.Count);
but I get:
error CS1525: Unexpected symbol `throw'
witch is totally logical.
BUT what I can't figure out is how does Unity handle this things that it points us to functions and not throw lines?
I hope any of you has knowledge in Unity Engine