Instead it throws an exception "This functionality may not be available in your Photoshop Version" or something of the kind. I can use the functionality, obviously, which is why this confuses me completely.
it's a whole collection of properties that shoots out this exception:
Most of the ones which dig deep into text formatting do so. Why ?
I have come across something like this with leading in the past.
There is a default value for leading ("(Auto)") that will return an error for
Only if leading is different from "(Auto)" one gets a value.
Which makes sense, I guess; by only explicitly storing a property if it is different from some defined default one can potentially save data.
One work-around is using a try-clause.
Well in that case it would make sense, but in mine, I don't get why it throws an exception related to unavailable functionality, while the functionality is there.
I would expect it to return any type of value, even if it's null or undefined or anything basically. I have a wild guess that while debugging a script Photoshop could be launched with some parameters like -debug which would put it into a "default settings" situation, in which it does not read user-level entries from the registry but rather ones from the machine, which come when installed. That might mean it doesn't know what version it is, version being dependent on what creative-cloud stores in the pc registry at a user lever.
Of course, this is kind of like a "conspiracy" theory.