I could get it like as follows. 
Thank you very much.

 newex = iris.cls('%Exception.PythonException')._New()
 newex.Code=str(ex.args)
 newex = iris.cls('%Exception.PythonException')._New(repr(ex),'','',str(ex.args)) 
 return newex 

===
+----------------- attribute values ------------------
| Code = "" <Set>
| Data = "('division by zero',)" <Set>
| ExceptionObject = ""
| InnerException = "" <Set>
| Location = "" <Set>
| Name = "ZeroDivisionError('division by zero')" <Set>

:

@Bob Kuszewski 
Thank you for your response.

I tried your advice.
I could receive a %Exception.PythonException object on an exception.
I didn't set any return type on the python method.
It looks better to catch the exception on the ObjectScript side, I'll use properly depending on the situation.

ClassMethod test3() [ Language = python ]
{
  a=1/0
}

ClassMethod test4() As %Status
{
 set status=$$$OK
 try {
  do ..test3()
 }
 catch ex {
  set status=ex.AsStatus()
 }
 return status
}
USER>s st= ##Class(User.PythonTest).test4()
ZeroDivisionError('division by zero')
%Exception.PythonException
 
USER>w $SYSTEM.Status.GetErrorText(st)
エラー #5002: Cache エラー:<SYNTAX>ztest4+3^User.PythonTest.1^2^  Do ..test3() *      <class 'ZeroDivisionError'>: division by zero -
USER>

@Jean Millette 
Thank you for your response.
I can receive a %Exception.PythonException object with your code!
However, it looks not to set the details of the exception.
Your StackOverflow link looks very useful, thank you very much.
In addition, print(repr(ex)) is very nice, too!

ClassMethod test2() As %Exception.PythonException [ Language = python ]
{
try:
 import iris
 a=1/0
 return ""
except Exception as ex:
 print(repr(ex))
 newex = iris.cls('%Exception.PythonException')._New(ex) 
 return newex
}
USER>s st= ##Class(User.PythonTest).test2()
ZeroDivisionError('division by zero')

USER>zw st
st=10@%Exception.PythonException ; <OREF>
+----------------- general information ---------------
| oref value: 10
| class name: %Exception.PythonException
| reference count: 3
+----------------- attribute values ------------------
| Code = "" <Set>
| Data = "" <Set>
| ExceptionObject = ""
| InnerException = "" <Set>
| Location = "" <Set>
| Name = "11@%SYS.Python" <Set>
| iStack = $lb("e^^^1")
+-----------------------------------------------------

USER>w st
10@%Exception.PythonException
USER>w st.DisplayString()
11@%SYS.Python
USER>w $SYSTEM.Status.GetErrorText(st.AsStatus())
エラー #5002: Cache エラー:11@%SYS.Python
USER>

Hi Dan,

Thank you for your response.

As long as I checked with a simple query, it did not seem to be using locks while building the cube.
In this time, I don't need detail listings and partial updates. I'll build the whole cube every time.
However, I'll try to use the way of your link(Defining the Query at Runtime) and set isolation level before running select query to avoid the worst case.

As for using buildRestriction and %OnProcessFact, I need to use DataConnector in my case.
I'm using aggregate function in my select item.
e.g. SELECT nid, MAX(CASE WHEN x='a' THEN d ELSE NULL END) as d1,  ...

I'll try to use "buildRestriction and %OnProcessFact" not DataConnector if the view can be controlled with the where clause in the future.